Detailed Description
C++ wrapper for the Benders' decomposition cut plugins.
Definition in file objbenderscut.h.
#include <cassert>
#include <cstring>
#include <utility>
#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 plugin. More... | |
Namespaces | |
scip | |
Functions | |
SCIP_RETCODE | SCIPincludeObjBenderscut (SCIP *scip, scip::ObjBenders *objbenders, scip::ObjBenderscut *objbenderscut, SCIP_Bool deleteobject) |
scip::ObjBenderscut * | SCIPfindObjBenderscut (scip::ObjBenders *objbenders, const char *name) |
scip::ObjBenderscut * | SCIPgetObjBenderscut (SCIP *scip, SCIP_BENDERSCUT *benderscut) |
Function Documentation
◆ SCIPincludeObjBenderscut()
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 205 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::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 237 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::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 260 of file objbenderscut.cpp.
References NULL, and SCIPbenderscutGetData().
Referenced by scip::ObjBenderscut::SCIP_DECL_BENDERSCUTEXITSOL().