Scippy

SCIP

Solving Constraint Integer Programs

objbenderscut.h File Reference

Detailed Description

C++ wrapper for the Benders' decomposition cut plugins.

Author
Stephen J. Maher

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

namespace  scip
 

Functions

SCIP_RETCODE SCIPincludeObjBenderscut (SCIP *scip, scip::ObjBenders *objbenders, scip::ObjBenderscut *objbenderscut, SCIP_Bool deleteobject)
 
scip::ObjBenderscutSCIPfindObjBenderscut (scip::ObjBenders *objbenders, const char *name)
 
scip::ObjBenderscutSCIPgetObjBenderscut (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:

  1. 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() !
  2. 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
scipSCIP data structure
objbendersBenders' decomposition object
objbenderscutBenders' decomposition cut object
deleteobjectshould 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().

◆ SCIPfindObjBenderscut()

scip::ObjBenderscut * SCIPfindObjBenderscut ( scip::ObjBenders objbenders,
const char *  name 
)

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

Parameters
objbendersBenders' decomposition object
namename of Benderscut' decomposition

Definition at line 237 of file objbenderscut.cpp.

References NULL, scip::ObjBenders::scip_, scip::ObjBenders::scip_name_, SCIPbenderscutGetData(), SCIPfindBenders(), and SCIPfindBenderscut().

◆ 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
scipSCIP data structure
benderscutBenderscut' decomposition

Definition at line 260 of file objbenderscut.cpp.

References NULL, and SCIPbenderscutGetData().