Detailed Description
C++ wrapper for Benders' decomposition plugins.
This class defines the interface for the Benders' decomposition framework implemented in C++. Note that there are pure virtual functions (these have to be implemented). These functions are: benders_exec(), benders_createsub(), benders_getvar().
- Instructions for implementing a Benders' decomposition plugin
- List of available Benders' decomposition plugins
- Corresponding C interface
Definition at line 56 of file objbenders.h.
C++ wrapper for Benders' decomposition plugins. More...
#include <objbenders.h>
Public Member Functions | |
ObjBenders (SCIP *scip, const char *name, const char *desc, int priority, SCIP_Bool cutlp, SCIP_Bool cutpseudo, SCIP_Bool cutrelax, SCIP_Bool shareauxvars) | |
ObjBenders (const ObjBenders &o) | |
ObjBenders (ObjBenders &&o) | |
virtual | ~ObjBenders () |
ObjBenders & | operator= (const ObjBenders &o)=delete |
ObjBenders & | operator= (ObjBenders &&o)=delete |
virtual | SCIP_DECL_BENDERSCOPY (scip_copy) |
virtual | SCIP_DECL_BENDERSFREE (scip_free) |
virtual | SCIP_DECL_BENDERSINIT (scip_init) |
virtual | SCIP_DECL_BENDERSEXIT (scip_exit) |
virtual | SCIP_DECL_BENDERSINITPRE (scip_initpre) |
virtual | SCIP_DECL_BENDERSEXITPRE (scip_exitpre) |
virtual | SCIP_DECL_BENDERSINITSOL (scip_initsol) |
virtual | SCIP_DECL_BENDERSEXITSOL (scip_exitsol) |
virtual | SCIP_DECL_BENDERSCREATESUB (scip_createsub)=0 |
virtual | SCIP_DECL_BENDERSPRESUBSOLVE (scip_presubsolve) |
virtual | SCIP_DECL_BENDERSSOLVESUBCONVEX (scip_solvesubconvex) |
virtual | SCIP_DECL_BENDERSSOLVESUB (scip_solvesub) |
virtual | SCIP_DECL_BENDERSPOSTSOLVE (scip_postsolve) |
virtual | SCIP_DECL_BENDERSFREESUB (scip_freesub) |
virtual | SCIP_DECL_BENDERSGETVAR (scip_getvar)=0 |
Public Member Functions inherited from scip::ObjCloneable | |
virtual | ~ObjCloneable () |
ObjCloneable & | operator= (const ObjCloneable &o)=delete |
ObjCloneable & | operator= (ObjCloneable &&o)=delete |
virtual | SCIP_DECL_OBJCLONEABLECLONE (ObjCloneable *clone) |
virtual | SCIP_DECL_OBJCLONEABLEISCLONEABLE (iscloneable) |
Data Fields | |
SCIP * | scip_ |
char * | scip_name_ |
char * | scip_desc_ |
const int | scip_priority_ |
const SCIP_Bool | scip_cutlp_ |
const SCIP_Bool | scip_cutpseudo_ |
const SCIP_Bool | scip_cutrelax_ |
const SCIP_Bool | scip_shareauxvars_ |
Constructor & Destructor Documentation
◆ ObjBenders() [1/3]
|
inline |
default constructor
- Parameters
-
scip SCIP data structure name name of Benders' decomposition desc description of Benders' decomposition priority priority of the Benders' decomposition cutlp should Benders' cuts be generated for LP solutions cutpseudo should Benders' cuts be generated for pseudo solutions cutrelax should Benders' cuts be generated for relaxation solutions shareauxvars should this Benders' use the highest priority Benders' aux vars
Definition at line 86 of file objbenders.h.
References scip_, SCIP_CALL_ABORT, scip_desc_, scip_name_, and SCIPduplicateMemoryArray.
◆ ObjBenders() [2/3]
|
inline |
copy constructor
Definition at line 111 of file objbenders.h.
◆ ObjBenders() [3/3]
|
inline |
move constructor
Definition at line 118 of file objbenders.h.
References scip_desc_, and scip_name_.
◆ ~ObjBenders()
|
inlinevirtual |
destructor
Definition at line 133 of file objbenders.h.
References scip_, scip_desc_, scip_name_, and SCIPfreeMemoryArray.
Member Function Documentation
◆ operator=() [1/2]
|
delete |
assignment of polymorphic classes causes slicing and is therefore disabled.
◆ operator=() [2/2]
|
delete |
assignment of polymorphic classes causes slicing and is therefore disabled.
◆ SCIP_DECL_BENDERSCOPY()
|
inlinevirtual |
copy method for benders plugins (called when SCIP copies plugins)
- See also
- SCIP_DECL_BENDERSCOPY(x) in type_benders.h
Definition at line 151 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSFREE()
|
inlinevirtual |
destructor of variable benders to free user data (called when SCIP is exiting)
- See also
- SCIP_DECL_BENDERSFREE(x) in type_benders.h
Definition at line 160 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSINIT()
|
inlinevirtual |
initialization method of variable benders (called after problem was transformed and benders is active)
- See also
- SCIP_DECL_BENDERSINIT(x) in type_benders.h
Definition at line 169 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSEXIT()
|
inlinevirtual |
deinitialization method of variable benders (called before transformed problem is freed and benders is active)
- See also
- SCIP_DECL_BENDERSEXIT(x) in type_benders.h
Definition at line 178 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSINITPRE()
|
inlinevirtual |
presolving initialization method of constraint handler (called when presolving is about to begin)
- See also
- SCIP_DECL_BENDERSINITPRE(x) in type_benders.h
Definition at line 187 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSEXITPRE()
|
inlinevirtual |
presolving deinitialization method of constraint handler (called after presolving has been finished)
- See also
- SCIP_DECL_BENDERSEXITPRE(x) in type_benders.h
Definition at line 196 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSINITSOL()
|
inlinevirtual |
solving process initialization method of variable benders (called when branch and bound process is about to begin)
- See also
- SCIP_DECL_BENDERSINITSOL(x) in type_benders.h
Definition at line 205 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSEXITSOL()
|
inlinevirtual |
solving process deinitialization method of variable benders (called before branch and bound process data is freed)
- See also
- SCIP_DECL_BENDERSEXITSOL(x) in type_benders.h
Definition at line 214 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSCREATESUB()
|
pure virtual |
the method for creating the Benders' decomposition subproblem. This method is called during the initialisation stage (after the master problem was transformed)
- See also
- SCIP_DECL_BENDERSCREATESUB(x) in type_benders.h
◆ SCIP_DECL_BENDERSPRESUBSOLVE()
|
inlinevirtual |
called before the subproblem solving loop for Benders' decomposition. The pre subproblem solve function gives the user an oppportunity to perform any global set up for the Benders' decomposition.
- See also
- SCIP_DECL_BENDERSPRESUBSOLVE(x) in type_benders.h
Definition at line 231 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSSOLVESUBCONVEX()
|
inlinevirtual |
the solving method for a single convex Benders' decomposition subproblem. The solving methods are separated so that they can be called in parallel.
- See also
- SCIP_DECL_BENDERSSOLVESUBCONVEX(x) in type_benders.h
Definition at line 241 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSSOLVESUB()
|
inlinevirtual |
the solving method for a single Benders' decomposition subproblem. The solving methods are separated so that they can be called in parallel.
- See also
- SCIP_DECL_BENDERSSOLVESUB(x) in type_benders.h
Definition at line 251 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSPOSTSOLVE()
|
inlinevirtual |
the post-solve method for Benders' decomposition. The post-solve method is called after the subproblems have been solved but before they are freed.
- See also
- SCIP_DECL_BENDERSPOSTSOLVE(x) in type_benders.h
Definition at line 260 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSFREESUB()
|
inlinevirtual |
frees the subproblem so that it can be resolved in the next iteration. In the SCIP case, this involves freeing the transformed problem using SCIPfreeTransform()
- See also
- SCIP_DECL_BENDERSFREESUB(x) in type_benders.h
Definition at line 270 of file objbenders.h.
References SCIP_OKAY.
◆ SCIP_DECL_BENDERSGETVAR()
|
pure virtual |
the variable mapping from the subproblem to the master problem.
- See also
- SCIP_DECL_BENDERSGETVAR(x) in type_benders.h
Field Documentation
◆ scip_
SCIP* scip::ObjBenders::scip_ |
SCIP data structure
Definition at line 62 of file objbenders.h.
Referenced by ObjBenders(), SCIPfindObjBenderscut(), SCIPincludeObjBenders(), and ~ObjBenders().
◆ scip_name_
char* scip::ObjBenders::scip_name_ |
name of the Benders' decomposition
Definition at line 65 of file objbenders.h.
Referenced by ObjBenders(), SCIPfindObjBenderscut(), SCIPincludeObjBenders(), SCIPincludeObjBenderscut(), and ~ObjBenders().
◆ scip_desc_
char* scip::ObjBenders::scip_desc_ |
description of the Benders' decomposition
Definition at line 68 of file objbenders.h.
Referenced by ObjBenders(), SCIPincludeObjBenders(), and ~ObjBenders().
◆ scip_priority_
const int scip::ObjBenders::scip_priority_ |
the priority of the Benders' decomposition
Definition at line 71 of file objbenders.h.
Referenced by SCIPincludeObjBenders().
◆ scip_cutlp_
const SCIP_Bool scip::ObjBenders::scip_cutlp_ |
should cuts be generated from the LP solution
Definition at line 74 of file objbenders.h.
Referenced by SCIPincludeObjBenders().
◆ scip_cutpseudo_
const SCIP_Bool scip::ObjBenders::scip_cutpseudo_ |
should cuts be generated from the pseudo solution
Definition at line 77 of file objbenders.h.
Referenced by SCIPincludeObjBenders().
◆ scip_cutrelax_
const SCIP_Bool scip::ObjBenders::scip_cutrelax_ |
should cuts be generated from the relaxation solution
Definition at line 80 of file objbenders.h.
Referenced by SCIPincludeObjBenders().
◆ scip_shareauxvars_
const SCIP_Bool scip::ObjBenders::scip_shareauxvars_ |
should this Benders' decomposition share the auxiliary variables from the highest priority Benders?
Definition at line 83 of file objbenders.h.
Referenced by SCIPincludeObjBenders().