Couenne
0.5.7
|
Cut Generator for linear convexifications. More...
#include <CouenneDisjCuts.hpp>
Public Member Functions | |
CouenneDisjCuts (Bonmin::OsiTMINLPInterface *minlp=NULL, Bonmin::BabSetupBase *base=NULL, CouenneCutGenerator *cg=NULL, OsiChooseVariable *bcv=NULL, bool is_strong=false, JnlstPtr journalist=NULL, const Ipopt::SmartPtr< Ipopt::OptionsList > options=NULL) | |
constructor More... | |
CouenneDisjCuts (const CouenneDisjCuts &) | |
copy constructor More... | |
~CouenneDisjCuts () | |
destructor More... | |
CouenneDisjCuts * | clone () const |
clone method (necessary for the abstract CglCutGenerator class) More... | |
CouenneCutGenerator * | couenneCG () const |
return pointer to symbolic problem More... | |
void | generateCuts (const OsiSolverInterface &, OsiCuts &, const CglTreeInfo=CglTreeInfo()) const |
the main CglCutGenerator More... | |
ConstJnlstPtr | Jnlst () const |
Provide Journalist. More... | |
int | getDisjunctions (std::vector< std::pair< OsiCuts *, OsiCuts * > > &disjunctions, OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo &info) const |
get all disjunctions More... | |
int | separateWithDisjunction (OsiCuts *cuts, OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo &info) const |
separate couenne cuts on both sides of single disjunction More... | |
int | generateDisjCuts (std::vector< std::pair< OsiCuts *, OsiCuts * > > &disjs, OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo &info) const |
generate one disjunctive cut from one CGLP More... | |
int | checkDisjSide (OsiSolverInterface &si, OsiCuts *cuts) const |
check if (column!) cuts compatible with solver interface More... | |
int | getBoxUnion (OsiSolverInterface &si, OsiCuts *left, OsiCuts *right, CoinPackedVector &lower, CoinPackedVector &upper) const |
compute smallest box containing both left and right boxes. More... | |
![]() | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())=0 |
CglCutGenerator () | |
CglCutGenerator (const CglCutGenerator &) | |
CglCutGenerator & | operator= (const CglCutGenerator &rhs) |
virtual | ~CglCutGenerator () |
virtual std::string | generateCpp (FILE *) |
virtual void | refreshSolver (OsiSolverInterface *) |
int | getAggressiveness () const |
void | setAggressiveness (int value) |
void | setGlobalCuts (bool trueOrFalse) |
bool | canDoGlobalCuts () const |
virtual bool | mayGenerateRowCutsInTree () const |
virtual bool | needsOptimalBasis () const |
virtual int | maximumLengthOfCutInTree () const |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())=0 |
CglCutGenerator () | |
CglCutGenerator (const CglCutGenerator &) | |
CglCutGenerator & | operator= (const CglCutGenerator &rhs) |
virtual | ~CglCutGenerator () |
virtual std::string | generateCpp (FILE *) |
virtual void | refreshSolver (OsiSolverInterface *) |
int | getAggressiveness () const |
void | setAggressiveness (int value) |
void | setGlobalCuts (bool trueOrFalse) |
bool | canDoGlobalCuts () const |
virtual bool | mayGenerateRowCutsInTree () const |
virtual bool | needsOptimalBasis () const |
virtual int | maximumLengthOfCutInTree () const |
Static Public Member Functions | |
static void | registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions) |
Add list of options to be read from file. More... | |
Protected Member Functions | |
OsiCuts * | getSingleDisjunction (OsiSolverInterface &si) const |
create single osicolcut disjunction More... | |
void | mergeBoxes (int dir, CoinPackedVector &left, CoinPackedVector &right, CoinPackedVector merged) const |
utility to merge vectors into one More... | |
void | applyColCuts (OsiSolverInterface &si, OsiCuts *cuts) const |
our own applyColCuts More... | |
void | applyColCuts (OsiSolverInterface &si, OsiColCut *cut) const |
our own applyColCut, single cut More... | |
void | OsiSI2MatrVec (CoinPackedMatrix &M, CoinPackedVector &r, OsiSolverInterface &si) const |
int | OsiCuts2MatrVec (OsiSolverInterface *cglp, OsiCuts *cuts, int displRow, int displRhs) const |
add CGLP columns to solver interface; return number of columns added (for later removal) More... | |
Protected Attributes | |
CouenneCutGenerator * | couenneCG_ |
pointer to symbolic repr. of constraint, variables, and bounds More... | |
int | nrootcuts_ |
number of cuts generated at the first call More... | |
int | ntotalcuts_ |
total number of cuts generated More... | |
double | septime_ |
separation time (includes generation of problem) More... | |
double | objValue_ |
Record obj value at final point of CouenneConv. More... | |
Bonmin::OsiTMINLPInterface * | minlp_ |
nonlinear solver interface as used within Bonmin (used at first Couenne pass of each b&b node) More... | |
OsiChooseVariable * | branchingMethod_ |
Branching scheme (if strong, we can use SB candidates) More... | |
bool | isBranchingStrong_ |
Is branchMethod_ referred to a strong branching scheme? More... | |
JnlstPtr | jnlst_ |
SmartPointer to the Journalist. More... | |
int | numDisjunctions_ |
Number of disjunction to consider at each separation. More... | |
double | initDisjPercentage_ |
Initial percentage of objects to use for generating cuts, in [0,1]. More... | |
int | initDisjNumber_ |
Initial number of objects to use for generating cuts. More... | |
int | depthLevelling_ |
Depth of the BB tree where start decreasing number of objects. More... | |
int | depthStopSeparate_ |
Depth of the BB tree where stop separation. More... | |
bool | activeRows_ |
only include active rows in CGLP More... | |
bool | activeCols_ |
only include active columns in CGLP More... | |
bool | addPreviousCut_ |
add previous disj cut to current CGLP? More... | |
double | cpuTime_ |
maximum CPU time More... | |
Additional Inherited Members | |
![]() | |
int | aggressive_ |
bool | canDoGlobalCuts_ |
Cut Generator for linear convexifications.
Definition at line 34 of file CouenneDisjCuts.hpp.
Couenne::CouenneDisjCuts::CouenneDisjCuts | ( | Bonmin::OsiTMINLPInterface * | minlp = NULL , |
Bonmin::BabSetupBase * | base = NULL , |
||
CouenneCutGenerator * | cg = NULL , |
||
OsiChooseVariable * | bcv = NULL , |
||
bool | is_strong = false , |
||
JnlstPtr | journalist = NULL , |
||
const Ipopt::SmartPtr< Ipopt::OptionsList > | options = NULL |
||
) |
constructor
Couenne::CouenneDisjCuts::CouenneDisjCuts | ( | const CouenneDisjCuts & | ) |
copy constructor
Couenne::CouenneDisjCuts::~CouenneDisjCuts | ( | ) |
destructor
|
inlinevirtual |
clone method (necessary for the abstract CglCutGenerator class)
Implements CglCutGenerator.
Definition at line 111 of file CouenneDisjCuts.hpp.
|
inline |
return pointer to symbolic problem
Definition at line 115 of file CouenneDisjCuts.hpp.
void Couenne::CouenneDisjCuts::generateCuts | ( | const OsiSolverInterface & | , |
OsiCuts & | , | ||
const | CglTreeInfo = CglTreeInfo() |
||
) | const |
the main CglCutGenerator
|
static |
Add list of options to be read from file.
|
inline |
Provide Journalist.
Definition at line 131 of file CouenneDisjCuts.hpp.
int Couenne::CouenneDisjCuts::getDisjunctions | ( | std::vector< std::pair< OsiCuts *, OsiCuts * > > & | disjunctions, |
OsiSolverInterface & | si, | ||
OsiCuts & | cs, | ||
const CglTreeInfo & | info | ||
) | const |
get all disjunctions
int Couenne::CouenneDisjCuts::separateWithDisjunction | ( | OsiCuts * | cuts, |
OsiSolverInterface & | si, | ||
OsiCuts & | cs, | ||
const CglTreeInfo & | info | ||
) | const |
separate couenne cuts on both sides of single disjunction
int Couenne::CouenneDisjCuts::generateDisjCuts | ( | std::vector< std::pair< OsiCuts *, OsiCuts * > > & | disjs, |
OsiSolverInterface & | si, | ||
OsiCuts & | cs, | ||
const CglTreeInfo & | info | ||
) | const |
generate one disjunctive cut from one CGLP
int Couenne::CouenneDisjCuts::checkDisjSide | ( | OsiSolverInterface & | si, |
OsiCuts * | cuts | ||
) | const |
check if (column!) cuts compatible with solver interface
int Couenne::CouenneDisjCuts::getBoxUnion | ( | OsiSolverInterface & | si, |
OsiCuts * | left, | ||
OsiCuts * | right, | ||
CoinPackedVector & | lower, | ||
CoinPackedVector & | upper | ||
) | const |
compute smallest box containing both left and right boxes.
|
protected |
create single osicolcut disjunction
|
protected |
utility to merge vectors into one
|
protected |
our own applyColCuts
|
protected |
our own applyColCut, single cut
|
protected |
|
protected |
add CGLP columns to solver interface; return number of columns added (for later removal)
|
protected |
pointer to symbolic repr. of constraint, variables, and bounds
Definition at line 39 of file CouenneDisjCuts.hpp.
|
mutableprotected |
number of cuts generated at the first call
Definition at line 42 of file CouenneDisjCuts.hpp.
|
mutableprotected |
total number of cuts generated
Definition at line 45 of file CouenneDisjCuts.hpp.
|
mutableprotected |
separation time (includes generation of problem)
Definition at line 48 of file CouenneDisjCuts.hpp.
|
mutableprotected |
Record obj value at final point of CouenneConv.
Definition at line 51 of file CouenneDisjCuts.hpp.
|
protected |
nonlinear solver interface as used within Bonmin (used at first Couenne pass of each b&b node)
Definition at line 55 of file CouenneDisjCuts.hpp.
|
protected |
Branching scheme (if strong, we can use SB candidates)
Definition at line 58 of file CouenneDisjCuts.hpp.
|
protected |
Is branchMethod_ referred to a strong branching scheme?
Definition at line 61 of file CouenneDisjCuts.hpp.
|
protected |
SmartPointer to the Journalist.
Definition at line 64 of file CouenneDisjCuts.hpp.
|
mutableprotected |
Number of disjunction to consider at each separation.
Definition at line 67 of file CouenneDisjCuts.hpp.
|
protected |
Initial percentage of objects to use for generating cuts, in [0,1].
Definition at line 70 of file CouenneDisjCuts.hpp.
|
protected |
Initial number of objects to use for generating cuts.
Definition at line 73 of file CouenneDisjCuts.hpp.
|
protected |
Depth of the BB tree where start decreasing number of objects.
Definition at line 76 of file CouenneDisjCuts.hpp.
|
protected |
Depth of the BB tree where stop separation.
Definition at line 79 of file CouenneDisjCuts.hpp.
|
protected |
only include active rows in CGLP
Definition at line 82 of file CouenneDisjCuts.hpp.
|
protected |
only include active columns in CGLP
Definition at line 85 of file CouenneDisjCuts.hpp.
|
protected |
add previous disj cut to current CGLP?
Definition at line 88 of file CouenneDisjCuts.hpp.
|
protected |
maximum CPU time
Definition at line 91 of file CouenneDisjCuts.hpp.