Detailed Description
C++ wrapper for Benders' decomposition cuts.
Definition in file objbenderscut.h.
#include <cassert>
#include <cstring>
#include "scip/scip.h"
#include "objscip/objcloneable.h"
#include "objscip/objbenders.h"
Go to the source code of this file.
Data Structures | |
class | scip::ObjBenderscut |
C++ wrapper for Benders' decomposition cut. More... | |
Namespaces | |
scip | |
Functions | |
SCIP_EXPORT SCIP_RETCODE | SCIPincludeObjBenderscut (SCIP *scip, scip::ObjBenders *objbenders, scip::ObjBenderscut *objbenderscut, SCIP_Bool deleteobject) |
SCIP_EXPORT scip::ObjBenderscut * | SCIPfindObjBenderscut (scip::ObjBenders *objbenders, const char *name) |
SCIP_EXPORT scip::ObjBenderscut * | SCIPgetObjBenderscut (SCIP *scip, SCIP_BENDERSCUT *benderscut) |
Function Documentation
◆ SCIPincludeObjBenderscut()
SCIP_EXPORT SCIP_RETCODE SCIPincludeObjBenderscut | ( | SCIP * | scip, |
scip::ObjBenders * | objbenders, | ||
scip::ObjBenderscut * | objbenderscut, | ||
SCIP_Bool | deleteobject | ||
) |
creates the Benders' decomposition cut for the given Benders' decomposition cut object and includes it in SCIP
The method should be called in one of the following ways:
- The user is responsible for deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyBenderscut* mybenderscut = new MyBenderscut(...); SCIP_CALL( SCIPincludeObjBenderscut(scip, benders, &mybenderscut, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mybenderscut; // delete benderscut AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjBenderscut(scip, benders, new MyBenderscut(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyBenderscut is called here
creates the Benders' decomposition cut for the given Benders' decomposition cut object and includes it in SCIP
- Parameters
-
scip SCIP data structure objbenders Benders' decomposition object objbenderscut Benders' decomposition cut object deleteobject should the Benders' decomposition cut object be deleted when benderscut is freed?
Definition at line 196 of file objbenderscut.cpp.
References NULL, scip::ObjBenderscut::scip_, SCIP_CALL, scip::ObjBenderscut::scip_desc_, scip::ObjBenderscut::scip_islpcut_, scip::ObjBenders::scip_name_, scip::ObjBenderscut::scip_name_, SCIP_OKAY, scip::ObjBenderscut::scip_priority_, SCIPfindBenders(), and SCIPincludeBenderscut().
Referenced by SCIP_DECL_BENDERSCUTCOPY(), and scip::ObjBenderscut::SCIP_DECL_BENDERSCUTEXITSOL().
◆ SCIPfindObjBenderscut()
SCIP_EXPORT scip::ObjBenderscut* SCIPfindObjBenderscut | ( | scip::ObjBenders * | objbenders, |
const char * | name | ||
) |
returns the benderscut object of the given name, or 0 if not existing
- Parameters
-
objbenders Benders' decomposition object name name of Benderscut' decomposition
Definition at line 228 of file objbenderscut.cpp.
References NULL, scip::ObjBenders::scip_, scip::ObjBenders::scip_name_, SCIPbenderscutGetData(), SCIPfindBenders(), and SCIPfindBenderscut().
Referenced by scip::ObjBenderscut::SCIP_DECL_BENDERSCUTEXITSOL().
◆ SCIPgetObjBenderscut()
SCIP_EXPORT scip::ObjBenderscut* SCIPgetObjBenderscut | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut | ||
) |
returns the benderscut object for the given constraint handler
returns the benderscut object for the given Benderscut' decomposition
- Parameters
-
scip SCIP data structure benderscut Benderscut' decomposition
Definition at line 251 of file objbenderscut.cpp.
References NULL, and SCIPbenderscutGetData().
Referenced by scip::ObjBenderscut::SCIP_DECL_BENDERSCUTEXITSOL().