Detailed Description
C++ wrapper for Benders' decomposition.
Definition in file objbenders.h.
Go to the source code of this file.
Data Structures | |
class | scip::ObjBenders |
C++ wrapper for Benders' decomposition plugins. More... | |
Namespaces | |
scip | |
Functions | |
SCIP_RETCODE | SCIPincludeObjBenders (SCIP *scip, scip::ObjBenders *objbenders, SCIP_Bool deleteobject) |
scip::ObjBenders * | SCIPfindObjBenders (SCIP *scip, const char *name) |
scip::ObjBenders * | SCIPgetObjBenders (SCIP *scip, SCIP_BENDERS *benders) |
Function Documentation
◆ SCIPincludeObjBenders()
SCIP_RETCODE SCIPincludeObjBenders | ( | SCIP * | scip, |
scip::ObjBenders * | objbenders, | ||
SCIP_Bool | deleteobject | ||
) |
creates the Benders' decomposition for the given Benders' decomposition object and includes it in SCIP
The method should be called in one of the following ways:
- The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyBenders* mybenders = new MyBenders(...); SCIP_CALL( SCIPincludeObjBenders(scip, &mybenders, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mybenders; // delete benders AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjBenders(scip, new MyBenders(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyBenders is called here
creates the Benders' decomposition for the given Benders' decomposition object and includes it in SCIP
- Parameters
-
scip SCIP data structure objbenders Benders' decomposition object deleteobject should the Benders' decomposition object be deleted when benders is freed?
Definition at line 335 of file objbenders.cpp.
References NULL, scip::ObjBenders::scip_, SCIP_CALL, scip::ObjBenders::scip_cutlp_, scip::ObjBenders::scip_cutpseudo_, scip::ObjBenders::scip_cutrelax_, scip::ObjBenders::scip_desc_, scip::ObjBenders::scip_name_, SCIP_OKAY, scip::ObjBenders::scip_priority_, scip::ObjBenders::scip_shareauxvars_, and SCIPincludeBenders().
Referenced by SCIP_DECL_BENDERSCOPY(), and scip::ObjBenders::SCIP_DECL_BENDERSFREESUB().
◆ SCIPfindObjBenders()
scip::ObjBenders* SCIPfindObjBenders | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the benders object of the given name, or 0 if not existing
- Parameters
-
scip SCIP data structure name name of Benders' decomposition
Definition at line 364 of file objbenders.cpp.
References NULL, SCIPbendersGetData(), and SCIPfindBenders().
Referenced by scip::ObjBenders::SCIP_DECL_BENDERSFREESUB().
◆ SCIPgetObjBenders()
scip::ObjBenders* SCIPgetObjBenders | ( | SCIP * | scip, |
SCIP_BENDERS * | benders | ||
) |
returns the benders object for the given constraint handler
returns the benders object for the given Benders' decomposition
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 383 of file objbenders.cpp.
References NULL, and SCIPbendersGetData().
Referenced by SCIP_DECL_BENDERSCUTCOPY(), and scip::ObjBenders::SCIP_DECL_BENDERSFREESUB().