Scippy

SCIP

Solving Constraint Integer Programs

scip::ObjBenders Class Referenceabstract

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().

Definition at line 47 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)
 
virtual ~ObjBenders ()
 
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 ()
 
virtual SCIP_DECL_OBJCLONEABLECLONE (ObjCloneable *clone)
 
virtual SCIP_DECL_OBJCLONEABLEISCLONEABLE (iscloneable)
 

Data Fields

SCIPscip_
 
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()

scip::ObjBenders::ObjBenders ( SCIP scip,
const char *  name,
const char *  desc,
int  priority,
SCIP_Bool  cutlp,
SCIP_Bool  cutpseudo,
SCIP_Bool  cutrelax,
SCIP_Bool  shareauxvars 
)
inline

default constructor

Parameters
scipSCIP data structure
namename of Benders' decomposition
descdescription of Benders' decomposition
prioritypriority of the Benders' decomposition
cutlpshould Benders' cuts be generated for LP solutions
cutpseudoshould Benders' cuts be generated for pseudo solutions
cutrelaxshould Benders' cuts be generated for relaxation solutions
shareauxvarsshould this Benders' use the highest priority Benders' aux vars

Definition at line 77 of file objbenders.h.

References SCIP_CALL_ABORT, and SCIPduplicateMemoryArray.

◆ ~ObjBenders()

virtual scip::ObjBenders::~ObjBenders ( )
inlinevirtual

destructor

Definition at line 102 of file objbenders.h.

References SCIPfreeMemoryArray.

Member Function Documentation

◆ SCIP_DECL_BENDERSCOPY()

virtual scip::ObjBenders::SCIP_DECL_BENDERSCOPY ( scip_copy  )
inlinevirtual

copy method for benders plugins (called when SCIP copies plugins)

See also
SCIP_DECL_BENDERSCOPY(x) in type_benders.h

Definition at line 114 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSFREE()

virtual scip::ObjBenders::SCIP_DECL_BENDERSFREE ( scip_free  )
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 123 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSINIT()

virtual scip::ObjBenders::SCIP_DECL_BENDERSINIT ( scip_init  )
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 132 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSEXIT()

virtual scip::ObjBenders::SCIP_DECL_BENDERSEXIT ( scip_exit  )
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 141 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSINITPRE()

virtual scip::ObjBenders::SCIP_DECL_BENDERSINITPRE ( scip_initpre  )
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 150 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSEXITPRE()

virtual scip::ObjBenders::SCIP_DECL_BENDERSEXITPRE ( scip_exitpre  )
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 159 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSINITSOL()

virtual scip::ObjBenders::SCIP_DECL_BENDERSINITSOL ( scip_initsol  )
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 168 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSEXITSOL()

virtual scip::ObjBenders::SCIP_DECL_BENDERSEXITSOL ( scip_exitsol  )
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 177 of file objbenders.h.

References SCIP_DECL_BENDERSCREATESUB(), and SCIP_OKAY.

◆ SCIP_DECL_BENDERSCREATESUB()

virtual scip::ObjBenders::SCIP_DECL_BENDERSCREATESUB ( scip_createsub  )
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

Referenced by SCIP_DECL_BENDERSEXITSOL().

◆ SCIP_DECL_BENDERSPRESUBSOLVE()

virtual scip::ObjBenders::SCIP_DECL_BENDERSPRESUBSOLVE ( scip_presubsolve  )
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 194 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSSOLVESUBCONVEX()

virtual scip::ObjBenders::SCIP_DECL_BENDERSSOLVESUBCONVEX ( scip_solvesubconvex  )
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 204 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSSOLVESUB()

virtual scip::ObjBenders::SCIP_DECL_BENDERSSOLVESUB ( scip_solvesub  )
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 214 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSPOSTSOLVE()

virtual scip::ObjBenders::SCIP_DECL_BENDERSPOSTSOLVE ( scip_postsolve  )
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 223 of file objbenders.h.

References SCIP_OKAY.

◆ SCIP_DECL_BENDERSFREESUB()

virtual scip::ObjBenders::SCIP_DECL_BENDERSFREESUB ( scip_freesub  )
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 233 of file objbenders.h.

References SCIP_Bool, SCIP_DECL_BENDERSGETVAR(), SCIP_EXPORT, SCIP_OKAY, SCIPfindObjBenders(), SCIPgetObjBenders(), and SCIPincludeObjBenders().

◆ SCIP_DECL_BENDERSGETVAR()

virtual scip::ObjBenders::SCIP_DECL_BENDERSGETVAR ( scip_getvar  )
pure virtual

the variable mapping from the subproblem to the master problem.

See also
SCIP_DECL_BENDERSGETVAR(x) in type_benders.h

Referenced by SCIP_DECL_BENDERSFREESUB().

Field Documentation

◆ scip_

SCIP* scip::ObjBenders::scip_

SCIP data structure

Definition at line 53 of file objbenders.h.

Referenced by SCIPfindObjBenderscut(), and SCIPincludeObjBenders().

◆ scip_name_

char* scip::ObjBenders::scip_name_

name of the Benders' decomposition

Definition at line 56 of file objbenders.h.

Referenced by SCIPfindObjBenderscut(), SCIPincludeObjBenders(), and SCIPincludeObjBenderscut().

◆ scip_desc_

char* scip::ObjBenders::scip_desc_

description of the Benders' decomposition

Definition at line 59 of file objbenders.h.

Referenced by SCIPincludeObjBenders().

◆ scip_priority_

const int scip::ObjBenders::scip_priority_

the priority of the Benders' decomposition

Definition at line 62 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 65 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 68 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 71 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 74 of file objbenders.h.

Referenced by SCIPincludeObjBenders().