Solving Constraint Integer Programs

objsepa.h File Reference

Detailed Description

C++ wrapper for cut separators.

Tobias Achterberg

Definition in file objsepa.h.

#include <cstring>
#include "scip/scip.h"
#include "objscip/objcloneable.h"

Go to the source code of this file.


SCIP_RETCODE SCIPincludeObjSepa (SCIP *scip, scip::ObjSepa *objsepa, SCIP_Bool deleteobject)
scip::ObjSepaSCIPfindObjSepa (SCIP *scip, const char *name)
scip::ObjSepaSCIPgetObjSepa (SCIP *scip, SCIP_SEPA *sepa)

Function Documentation

SCIP_RETCODE SCIPincludeObjSepa ( SCIP scip,
scip::ObjSepa objsepa,
SCIP_Bool  deleteobject 

creates the cut separator for the given cut separator object and includes it in SCIP

The method should be called in one of the following ways:

  1. The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MySepa* mysepa = new MySepa(...); SCIP_CALL( SCIPincludeObjSepa(scip, &mysepa, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mysepa; // delete sepa AFTER SCIPfree() !
  1. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjSepa(scip, new MySepa(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MySepa is called here
scipSCIP data structure
objsepacut separator object
deleteobjectshould the cut separator object be deleted when cut separator is freed?
scip::ObjSepa* SCIPfindObjSepa ( SCIP scip,
const char *  name 

returns the sepa object of the given name, or 0 if not existing

scipSCIP data structure
namename of cut separator
scip::ObjSepa* SCIPgetObjSepa ( SCIP scip,

returns the sepa object for the given cut separator

scipSCIP data structure
sepacut separator