Scippy

SCIP

Solving Constraint Integer Programs

objbenders.cpp File Reference

Detailed Description

C++ wrapper for the Benders' decomposition plugins.

Author
Stephen J. Maher

Definition in file objbenders.cpp.

#include <cassert>
#include "objbenders.h"

Go to the source code of this file.

Functions

static SCIP_DECL_BENDERSCOPY (bendersCopyObj)
 
static SCIP_DECL_BENDERSFREE (bendersFreeObj)
 
static SCIP_DECL_BENDERSINIT (bendersInitObj)
 
static SCIP_DECL_BENDERSEXIT (bendersExitObj)
 
static SCIP_DECL_BENDERSINITPRE (bendersInitpreObj)
 
static SCIP_DECL_BENDERSEXITPRE (bendersExitpreObj)
 
static SCIP_DECL_BENDERSINITSOL (bendersInitsolObj)
 
static SCIP_DECL_BENDERSEXITSOL (bendersExitsolObj)
 
static SCIP_DECL_BENDERSCREATESUB (bendersCreatesubObj)
 
static SCIP_DECL_BENDERSPRESUBSOLVE (bendersPresubsolveObj)
 
static SCIP_DECL_BENDERSSOLVESUBCONVEX (bendersSolvesubconvexObj)
 
static SCIP_DECL_BENDERSSOLVESUB (bendersSolvesubObj)
 
static SCIP_DECL_BENDERSPOSTSOLVE (bendersPostsolveObj)
 
static SCIP_DECL_BENDERSFREESUB (bendersFreesubObj)
 
static SCIP_DECL_BENDERSGETVAR (bendersGetvarObj)
 
SCIP_RETCODE SCIPincludeObjBenders (SCIP *scip, scip::ObjBenders *objbenders, SCIP_Bool deleteobject)
 
scip::ObjBendersSCIPfindObjBenders (SCIP *scip, const char *name)
 
scip::ObjBendersSCIPgetObjBenders (SCIP *scip, SCIP_BENDERS *benders)
 

Function Documentation

◆ SCIP_DECL_BENDERSCOPY()

static SCIP_DECL_BENDERSCOPY ( bendersCopyObj  )
static

copy method for Benders' decomposition plugins (called when SCIP copies plugins)

Definition at line 53 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetData(), SCIPincludeObjBenders(), and TRUE.

◆ SCIP_DECL_BENDERSFREE()

static SCIP_DECL_BENDERSFREE ( bendersFreeObj  )
static

destructor of Benders' decomposition to free user data (called when SCIP is exiting)

Definition at line 78 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetData(), and SCIPbendersSetData().

◆ SCIP_DECL_BENDERSINIT()

static SCIP_DECL_BENDERSINIT ( bendersInitObj  )
static

initialization method of Benders' decomposition (called after problem was transformed)

Definition at line 104 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSEXIT()

static SCIP_DECL_BENDERSEXIT ( bendersExitObj  )
static

deinitialization method of Benders' decomposition (called before transformed problem is freed)

Definition at line 122 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSINITPRE()

static SCIP_DECL_BENDERSINITPRE ( bendersInitpreObj  )
static

presolving initialization method of Benders' decomposition (called when presolving is about to begin)

Definition at line 139 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSEXITPRE()

static SCIP_DECL_BENDERSEXITPRE ( bendersExitpreObj  )
static

presolving deinitialization method of Benders' decomposition (called after presolving has been finished)

Definition at line 156 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSINITSOL()

static SCIP_DECL_BENDERSINITSOL ( bendersInitsolObj  )
static

solving process initialization method of Benders' decomposition (called when branch and bound process is about to begin)

Definition at line 173 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSEXITSOL()

static SCIP_DECL_BENDERSEXITSOL ( bendersExitsolObj  )
static

solving process deinitialization method of Benders' decomposition (called before branch and bound process data is freed)

Definition at line 190 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSCREATESUB()

static SCIP_DECL_BENDERSCREATESUB ( bendersCreatesubObj  )
static

method that is called to create the subproblem and register it with the Benders' decomposition structure.

Definition at line 207 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSPRESUBSOLVE()

static SCIP_DECL_BENDERSPRESUBSOLVE ( bendersPresubsolveObj  )
static

methods called prior to solving the subproblems

Definition at line 224 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSSOLVESUBCONVEX()

static SCIP_DECL_BENDERSSOLVESUBCONVEX ( bendersSolvesubconvexObj  )
static

method called to solve the convex relaxation of an individual subproblem of the Benders' decomposition

Definition at line 241 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSSOLVESUB()

static SCIP_DECL_BENDERSSOLVESUB ( bendersSolvesubObj  )
static

method called to solve an individual subproblem of the Benders' decomposition

Definition at line 259 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSPOSTSOLVE()

static SCIP_DECL_BENDERSPOSTSOLVE ( bendersPostsolveObj  )
static

method called after the subproblems are solved in the Benders' decomposition algorithm

Definition at line 276 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSFREESUB()

static SCIP_DECL_BENDERSFREESUB ( bendersFreesubObj  )
static

frees an individual subproblem. Called in each iteration of the Benders' decomposition algorithm

Definition at line 294 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ SCIP_DECL_BENDERSGETVAR()

static SCIP_DECL_BENDERSGETVAR ( bendersGetvarObj  )
static

callback method to retrieve the master (subproblem) variable corresponding to the input subproblem (master) variable

Definition at line 311 of file objbenders.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPbendersGetData().

◆ 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

Parameters
scipSCIP data structure
objbendersBenders' decomposition object
deleteobjectshould the Benders' decomposition object be deleted when benders is freed?

Definition at line 334 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
scipSCIP data structure
namename of Benders' decomposition

Definition at line 363 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 Benders' decomposition

Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 382 of file objbenders.cpp.

References NULL, and SCIPbendersGetData().

Referenced by SCIP_DECL_BENDERSCUTCOPY(), and scip::ObjBenders::SCIP_DECL_BENDERSFREESUB().