Dip
0.92.4
|
Cut Generator Base Class. More...
#include <CglCutGenerator.hpp>
Public Member Functions | |
Generate Cuts | |
virtual void | generateCuts (const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())=0 |
Generate cuts for the model data contained in si. More... | |
Constructors and destructors | |
CglCutGenerator () | |
Default constructor. More... | |
CglCutGenerator (const CglCutGenerator &) | |
Copy constructor. More... | |
virtual CglCutGenerator * | clone () const =0 |
Clone. More... | |
CglCutGenerator & | operator= (const CglCutGenerator &rhs) |
Assignment operator. More... | |
virtual | ~CglCutGenerator () |
Destructor. More... | |
virtual std::string | generateCpp (FILE *) |
Create C++ lines to set the generator in the current state. More... | |
virtual void | refreshSolver (OsiSolverInterface *) |
This can be used to refresh any information. More... | |
Gets and Sets | |
int | getAggressiveness () const |
Get Aggressiveness - 0 = neutral, 100 is normal root node. More... | |
void | setAggressiveness (int value) |
Set Aggressiveness - 0 = neutral, 100 is normal root node. More... | |
void | setGlobalCuts (bool trueOrFalse) |
Set whether can do global cuts. More... | |
bool | canDoGlobalCuts () const |
Say whether can do global cuts. More... | |
virtual bool | mayGenerateRowCutsInTree () const |
Returns true if may generate Row cuts in tree (rather than root node). More... | |
virtual bool | needsOptimalBasis () const |
Return true if needs optimal basis to do cuts. More... | |
virtual int | maximumLengthOfCutInTree () const |
Return maximum length of cut in tree. More... | |
Public Attributes | |
int | aggressive_ |
Aggressiveness - 0 = neutral, 100 is normal root node. More... | |
bool | canDoGlobalCuts_ |
True if can do global cuts i.e. no general integers. More... | |
Cut Generator Base Class.
This is an abstract base class for generating cuts. A specific cut generator will inherit from this class.
Definition at line 23 of file CglCutGenerator.hpp.
CglCutGenerator::CglCutGenerator | ( | ) |
Default constructor.
CglCutGenerator::CglCutGenerator | ( | const CglCutGenerator & | ) |
Copy constructor.
|
virtual |
Destructor.
|
pure virtual |
Generate cuts for the model data contained in si.
The generated cuts are inserted into and returned in the collection of cuts cs.
Implemented in CglTemporary, CglImplication, CglFakeClique, CglLandP, CglFlowCover, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglTwomir, CglProbing, CglResidualCapacity, CglRedSplit2, CglGMI, CglRedSplit, CglOddHole, CglDuplicateRow, CglSimpleRounding, CglZeroHalf, CglGomory, CglClique, CglAllDifferent, CglStored, CglKnapsackCover, and CglLiftAndProject.
|
pure virtual |
Clone.
Implemented in CglTemporary, CglImplication, CglProbing, CglFakeClique, CglFlowCover, CglLandP, CglRedSplit, CglTwomir, CglRedSplit2, CglGMI, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglGomory, CglDuplicateRow, CglResidualCapacity, CglStored, CglOddHole, CglZeroHalf, CglLiftAndProject, CglSimpleRounding, CglAllDifferent, CglKnapsackCover, and CglClique.
CglCutGenerator& CglCutGenerator::operator= | ( | const CglCutGenerator & | rhs | ) |
Assignment operator.
|
inlinevirtual |
Create C++ lines to set the generator in the current state.
The output must be parsed by the calling code, as each line starts with a key indicating the following:
0: must be kept (for #includes etc)
3: Set to changed (not default) values
4: Set to default values (redundant)
Keys 1, 2, 5, 6, 7, 8 are defined, but not applicable to cut generators.
Reimplemented in CglImplication, CglProbing, CglFlowCover, CglRedSplit, CglTwomir, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglGMI, CglGomory, CglDuplicateRow, CglZeroHalf, CglLiftAndProject, CglSimpleRounding, CglAllDifferent, CglClique, and CglKnapsackCover.
Definition at line 64 of file CglCutGenerator.hpp.
|
inlinevirtual |
This can be used to refresh any information.
Reimplemented in CglProbing, CglTwomir, CglMixedIntegerRounding2, CglMixedIntegerRounding, CglGomory, CglDuplicateRow, CglOddHole, CglZeroHalf, CglAllDifferent, and CglKnapsackCover.
Definition at line 67 of file CglCutGenerator.hpp.
|
inline |
Get Aggressiveness - 0 = neutral, 100 is normal root node.
Really just a hint to cut generator
Definition at line 76 of file CglCutGenerator.hpp.
References aggressive_.
|
inline |
Set Aggressiveness - 0 = neutral, 100 is normal root node.
Really just a hint to cut generator
Definition at line 85 of file CglCutGenerator.hpp.
References aggressive_.
|
inline |
Set whether can do global cuts.
Definition at line 90 of file CglCutGenerator.hpp.
References canDoGlobalCuts_.
|
inline |
Say whether can do global cuts.
Definition at line 95 of file CglCutGenerator.hpp.
References canDoGlobalCuts_.
|
virtual |
Returns true if may generate Row cuts in tree (rather than root node).
Used so know if matrix will change in tree. Really meant so column cut generators can still be active without worrying code. Default is true
Reimplemented in CglProbing, and CglAllDifferent.
|
virtual |
Return true if needs optimal basis to do cuts.
Reimplemented in CglLandP, CglTwomir, CglRedSplit2, CglGMI, CglRedSplit, and CglGomory.
|
inlinevirtual |
Return maximum length of cut in tree.
Reimplemented in CglTwomir, and CglGomory.
Definition at line 110 of file CglCutGenerator.hpp.
References COIN_INT_MAX.
int CglCutGenerator::aggressive_ |
Aggressiveness - 0 = neutral, 100 is normal root node.
Really just a hint to cut generator
Definition at line 125 of file CglCutGenerator.hpp.
Referenced by getAggressiveness(), and setAggressiveness().
bool CglCutGenerator::canDoGlobalCuts_ |
True if can do global cuts i.e. no general integers.
Definition at line 127 of file CglCutGenerator.hpp.
Referenced by canDoGlobalCuts(), and setGlobalCuts().