Private Attributes | List of all members
CbcCutGenerator Class Reference

Interface between Cbc and Cut Generation Library. More...

#include <CbcCutGenerator.hpp>

Public Member Functions

Generate Cuts
bool generateCuts (OsiCuts &cs, int fullScan, OsiSolverInterface *solver, CbcNode *node)
 Generate cuts for the client model. More...
 
bool generateCuts (OsiCuts &cs, int fullScan, OsiSolverInterface *solver, CbcNode *node)
 Generate cuts for the client model. More...
 
Constructors and destructors
 CbcCutGenerator ()
 Default constructor. More...
 
 CbcCutGenerator (CbcModel *model, CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false, int howOftenInsub=-100, int whatDepth=-1, int whatDepthInSub=-1, int switchOffIfLessThan=0)
 Normal constructor. More...
 
 CbcCutGenerator (const CbcCutGenerator &)
 Copy constructor. More...
 
CbcCutGeneratoroperator= (const CbcCutGenerator &rhs)
 Assignment operator. More...
 
 ~CbcCutGenerator ()
 Destructor. More...
 
 CbcCutGenerator ()
 Default constructor. More...
 
 CbcCutGenerator (CbcModel *model, CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false, int howOftenInsub=-100, int whatDepth=-1, int whatDepthInSub=-1, int switchOffIfLessThan=0)
 Normal constructor. More...
 
 CbcCutGenerator (const CbcCutGenerator &)
 Copy constructor. More...
 
CbcCutGeneratoroperator= (const CbcCutGenerator &rhs)
 Assignment operator. More...
 
 ~CbcCutGenerator ()
 Destructor. More...
 
Gets and sets
void refreshModel (CbcModel *model)
 Set the client model. More...
 
const char * cutGeneratorName () const
 return name of generator More...
 
void generateTuning (FILE *fp)
 Create C++ lines to show how to tune. More...
 
void setHowOften (int value)
 Set the cut generation interval. More...
 
int howOften () const
 Get the cut generation interval. More...
 
int howOftenInSub () const
 Get the cut generation interval.in sub tree. More...
 
int inaccuracy () const
 Get level of cut inaccuracy (0 means exact e.g. cliques) More...
 
void setInaccuracy (int level)
 Set level of cut inaccuracy (0 means exact e.g. cliques) More...
 
void setWhatDepth (int value)
 Set the cut generation depth. More...
 
void setWhatDepthInSub (int value)
 Set the cut generation depth in sub tree. More...
 
int whatDepth () const
 Get the cut generation depth criterion. More...
 
int whatDepthInSub () const
 Get the cut generation depth criterion.in sub tree. More...
 
bool normal () const
 Get whether the cut generator should be called in the normal place. More...
 
void setNormal (bool value)
 Set whether the cut generator should be called in the normal place. More...
 
bool atSolution () const
 Get whether the cut generator should be called when a solution is found. More...
 
void setAtSolution (bool value)
 Set whether the cut generator should be called when a solution is found. More...
 
bool whenInfeasible () const
 Get whether the cut generator should be called when the subproblem is found to be infeasible. More...
 
void setWhenInfeasible (bool value)
 Set whether the cut generator should be called when the subproblem is found to be infeasible. More...
 
bool timing () const
 Get whether the cut generator is being timed. More...
 
void setTiming (bool value)
 Set whether the cut generator is being timed. More...
 
double timeInCutGenerator () const
 Return time taken in cut generator. More...
 
void incrementTimeInCutGenerator (double value)
 Set the client model. More...
 
CglCutGenerator * generator () const
 Get the CglCutGenerator corresponding to this CbcCutGenerator. More...
 
int numberTimesEntered () const
 Number times cut generator entered. More...
 
void setNumberTimesEntered (int value)
 Set the client model. More...
 
void incrementNumberTimesEntered (int value=1)
 Set the client model. More...
 
int numberCutsInTotal () const
 Total number of cuts added. More...
 
void setNumberCutsInTotal (int value)
 Set the client model. More...
 
void incrementNumberCutsInTotal (int value=1)
 Set the client model. More...
 
int numberElementsInTotal () const
 Total number of elements added. More...
 
void setNumberElementsInTotal (int value)
 Set the client model. More...
 
void incrementNumberElementsInTotal (int value=1)
 Set the client model. More...
 
int numberColumnCuts () const
 Total number of column cuts. More...
 
void setNumberColumnCuts (int value)
 Set the client model. More...
 
void incrementNumberColumnCuts (int value=1)
 Set the client model. More...
 
int numberCutsActive () const
 Total number of cuts active after (at end of n cut passes at each node) More...
 
void setNumberCutsActive (int value)
 Set the client model. More...
 
void incrementNumberCutsActive (int value=1)
 Set the client model. More...
 
void setSwitchOffIfLessThan (int value)
 Set the client model. More...
 
int switchOffIfLessThan () const
 Set the client model. More...
 
bool needsOptimalBasis () const
 Say if optimal basis needed. More...
 
void setNeedsOptimalBasis (bool yesNo)
 Set if optimal basis needed. More...
 
bool mustCallAgain () const
 Whether generator MUST be called again if any cuts (i.e. ignore break from loop) More...
 
void setMustCallAgain (bool yesNo)
 Set whether generator MUST be called again if any cuts (i.e. ignore break from loop) More...
 
bool switchedOff () const
 Whether generator switched off for moment. More...
 
void setSwitchedOff (bool yesNo)
 Set whether generator switched off for moment. More...
 
bool ineffectualCuts () const
 Whether last round of cuts did little. More...
 
void setIneffectualCuts (bool yesNo)
 Set whether last round of cuts did little. More...
 
bool whetherToUse () const
 Whether to use if any cuts generated. More...
 
void setWhetherToUse (bool yesNo)
 Set whether to use if any cuts generated. More...
 
int numberCutsAtRoot () const
 Number of cuts generated at root. More...
 
void setNumberCutsAtRoot (int value)
 Set the client model. More...
 
int numberActiveCutsAtRoot () const
 Number of cuts active at root. More...
 
void setNumberActiveCutsAtRoot (int value)
 Set the client model. More...
 
int numberShortCutsAtRoot () const
 Number of short cuts at root. More...
 
void setModel (CbcModel *model)
 Set model. More...
 
bool globalCutsAtRoot () const
 Whether global cuts at root. More...
 
void setGlobalCutsAtRoot (bool yesNo)
 Set whether global cuts at root. More...
 
bool globalCuts () const
 Whether global cuts. More...
 
void setGlobalCuts (bool yesNo)
 Set whether global cuts. More...
 
void refreshModel (CbcModel *model)
 Set the client model. More...
 
const char * cutGeneratorName () const
 return name of generator More...
 
void generateTuning (FILE *fp)
 Create C++ lines to show how to tune. More...
 
void setHowOften (int value)
 Set the cut generation interval. More...
 
int howOften () const
 Get the cut generation interval. More...
 
int howOftenInSub () const
 Get the cut generation interval.in sub tree. More...
 
int inaccuracy () const
 Get level of cut inaccuracy (0 means exact e.g. cliques) More...
 
void setInaccuracy (int level)
 Set level of cut inaccuracy (0 means exact e.g. cliques) More...
 
void setWhatDepth (int value)
 Set the cut generation depth. More...
 
void setWhatDepthInSub (int value)
 Set the cut generation depth in sub tree. More...
 
int whatDepth () const
 Get the cut generation depth criterion. More...
 
int whatDepthInSub () const
 Get the cut generation depth criterion.in sub tree. More...
 
bool normal () const
 Get whether the cut generator should be called in the normal place. More...
 
void setNormal (bool value)
 Set whether the cut generator should be called in the normal place. More...
 
bool atSolution () const
 Get whether the cut generator should be called when a solution is found. More...
 
void setAtSolution (bool value)
 Set whether the cut generator should be called when a solution is found. More...
 
bool whenInfeasible () const
 Get whether the cut generator should be called when the subproblem is found to be infeasible. More...
 
void setWhenInfeasible (bool value)
 Set whether the cut generator should be called when the subproblem is found to be infeasible. More...
 
bool timing () const
 Get whether the cut generator is being timed. More...
 
void setTiming (bool value)
 Set whether the cut generator is being timed. More...
 
double timeInCutGenerator () const
 Return time taken in cut generator. More...
 
void incrementTimeInCutGenerator (double value)
 Set the client model. More...
 
CglCutGenerator * generator () const
 Get the CglCutGenerator corresponding to this CbcCutGenerator. More...
 
int numberTimesEntered () const
 Number times cut generator entered. More...
 
void setNumberTimesEntered (int value)
 Set the client model. More...
 
void incrementNumberTimesEntered (int value=1)
 Set the client model. More...
 
int numberCutsInTotal () const
 Total number of cuts added. More...
 
void setNumberCutsInTotal (int value)
 Set the client model. More...
 
void incrementNumberCutsInTotal (int value=1)
 Set the client model. More...
 
int numberElementsInTotal () const
 Total number of elements added. More...
 
void setNumberElementsInTotal (int value)
 Set the client model. More...
 
void incrementNumberElementsInTotal (int value=1)
 Set the client model. More...
 
int numberColumnCuts () const
 Total number of column cuts. More...
 
void setNumberColumnCuts (int value)
 Set the client model. More...
 
void incrementNumberColumnCuts (int value=1)
 Set the client model. More...
 
int numberCutsActive () const
 Total number of cuts active after (at end of n cut passes at each node) More...
 
void setNumberCutsActive (int value)
 Set the client model. More...
 
void incrementNumberCutsActive (int value=1)
 Set the client model. More...
 
void setSwitchOffIfLessThan (int value)
 Set the client model. More...
 
int switchOffIfLessThan () const
 Set the client model. More...
 
bool needsOptimalBasis () const
 Say if optimal basis needed. More...
 
void setNeedsOptimalBasis (bool yesNo)
 Set if optimal basis needed. More...
 
bool mustCallAgain () const
 Whether generator MUST be called again if any cuts (i.e. ignore break from loop) More...
 
void setMustCallAgain (bool yesNo)
 Set whether generator MUST be called again if any cuts (i.e. ignore break from loop) More...
 
bool switchedOff () const
 Whether generator switched off for moment. More...
 
void setSwitchedOff (bool yesNo)
 Set whether generator switched off for moment. More...
 
bool ineffectualCuts () const
 Whether last round of cuts did little. More...
 
void setIneffectualCuts (bool yesNo)
 Set whether last round of cuts did little. More...
 
bool whetherToUse () const
 Whether to use if any cuts generated. More...
 
void setWhetherToUse (bool yesNo)
 Set whether to use if any cuts generated. More...
 
int numberCutsAtRoot () const
 Number of cuts generated at root. More...
 
void setNumberCutsAtRoot (int value)
 Set the client model. More...
 
int numberActiveCutsAtRoot () const
 Number of cuts active at root. More...
 
void setNumberActiveCutsAtRoot (int value)
 Set the client model. More...
 
int numberShortCutsAtRoot () const
 Number of short cuts at root. More...
 
void setModel (CbcModel *model)
 Set model. More...
 
bool globalCutsAtRoot () const
 Whether global cuts at root. More...
 
void setGlobalCutsAtRoot (bool yesNo)
 Set whether global cuts at root. More...
 
bool globalCuts () const
 Whether global cuts. More...
 
void setGlobalCuts (bool yesNo)
 Set whether global cuts. More...
 

Private Attributes

OsiCuts savedCuts_
 Saved cuts. More...
 
double timeInCutGenerator_
 Time in cut generator. More...
 
CbcModelmodel_
 The client model. More...
 
CglCutGenerator * generator_
 
char * generatorName_
 Name of generator. More...
 
int whenCutGenerator_
 Number of nodes between calls to the CglCutGenerator::generateCuts routine. More...
 
int whenCutGeneratorInSub_
 Number of nodes between calls to the CglCutGenerator::generateCuts routine in sub tree. More...
 
int switchOffIfLessThan_
 If first pass at root produces fewer than this cuts then switch off. More...
 
int depthCutGenerator_
 Depth at which to call the CglCutGenerator::generateCuts routine (If >0 then overrides when and is called if depthdepthCutGenerator==0). More...
 
int depthCutGeneratorInSub_
 Depth at which to call the CglCutGenerator::generateCuts routine (If >0 then overrides when and is called if depthdepthCutGenerator==0). More...
 
int inaccuracy_
 Level of cut inaccuracy (0 means exact e.g. cliques) More...
 
int numberTimes_
 Number times cut generator entered. More...
 
int numberCuts_
 Total number of cuts added. More...
 
int numberElements_
 Total number of elements added. More...
 
int numberColumnCuts_
 Total number of column cuts added. More...
 
int numberCutsActive_
 Total number of cuts active after (at end of n cut passes at each node) More...
 
int numberCutsAtRoot_
 Number of cuts generated at root. More...
 
int numberActiveCutsAtRoot_
 Number of cuts active at root. More...
 
int numberShortCutsAtRoot_
 Number of short cuts at root. More...
 
int switches_
 Switches - see gets and sets. More...
 

Detailed Description

Interface between Cbc and Cut Generation Library.

CbcCutGenerator is intended to provide an intelligent interface between Cbc and the cutting plane algorithms in the CGL. A CbcCutGenerator is bound to a CglCutGenerator and to an CbcModel. It contains parameters which control when and how the generateCuts method of the CglCutGenerator will be called.

The builtin decision criteria available to use when deciding whether to generate cuts are limited: every X nodes, when a solution is found, and when a subproblem is found to be infeasible. The idea is that the class will grow more intelligent with time.

Todo:
Add a pointer to function member which will allow a client to install their own decision algorithm to decide whether or not to call the CGL generateCuts method. Create a default decision method that looks at the builtin criteria.
Todo:
It strikes me as not good that generateCuts contains code specific to individual CGL algorithms. Another set of pointer to function members, so that the client can specify the cut generation method as well as pre- and post-generation methods? Taken a bit further, should this class contain a bunch of pointer to function members, one for each of the places where the cut generator might be referenced? Initialization, root node, search tree node, discovery of solution, and termination all come to mind. Initialization and termination would also be useful for instrumenting cbc.

CbcCutGenerator is intended to provide an intelligent interface between Cbc and the cutting plane algorithms in the CGL. A CbcCutGenerator is bound to a CglCutGenerator and to an CbcModel. It contains parameters which control when and how the generateCuts method of the CglCutGenerator will be called.

The builtin decision criteria available to use when deciding whether to generate cuts are limited: every X nodes, when a solution is found, and when a subproblem is found to be infeasible. The idea is that the class will grow more intelligent with time.

Todo:
Add a pointer to function member which will allow a client to install their own decision algorithm to decide whether or not to call the CGL generateCuts method. Create a default decision method that looks at the builtin criteria.
Todo:
It strikes me as not good that generateCuts contains code specific to individual CGL algorithms. Another set of pointer to function members, so that the client can specify the cut generation method as well as pre- and post-generation methods? Taken a bit further, should this class contain a bunch of pointer to function members, one for each of the places where the cut generator might be referenced? Initialization, root node, search tree node, discovery of solution, and termination all come to mind. Initialization and termination would also be useful for instrumenting cbc.

Definition at line 47 of file CbcCutGenerator.hpp.

Constructor & Destructor Documentation

CbcCutGenerator::CbcCutGenerator ( )

Default constructor.

CbcCutGenerator::CbcCutGenerator ( CbcModel model,
CglCutGenerator *  generator,
int  howOften = 1,
const char *  name = NULL,
bool  normal = true,
bool  atSolution = false,
bool  infeasible = false,
int  howOftenInsub = -100,
int  whatDepth = -1,
int  whatDepthInSub = -1,
int  switchOffIfLessThan = 0 
)

Normal constructor.

CbcCutGenerator::CbcCutGenerator ( const CbcCutGenerator )

Copy constructor.

CbcCutGenerator::~CbcCutGenerator ( )

Destructor.

CbcCutGenerator::CbcCutGenerator ( )

Default constructor.

CbcCutGenerator::CbcCutGenerator ( CbcModel model,
CglCutGenerator *  generator,
int  howOften = 1,
const char *  name = NULL,
bool  normal = true,
bool  atSolution = false,
bool  infeasible = false,
int  howOftenInsub = -100,
int  whatDepth = -1,
int  whatDepthInSub = -1,
int  switchOffIfLessThan = 0 
)

Normal constructor.

CbcCutGenerator::CbcCutGenerator ( const CbcCutGenerator )

Copy constructor.

CbcCutGenerator::~CbcCutGenerator ( )

Destructor.

Member Function Documentation

bool CbcCutGenerator::generateCuts ( OsiCuts &  cs,
int  fullScan,
OsiSolverInterface *  solver,
CbcNode node 
)

Generate cuts for the client model.

Evaluate the state of the client model and decide whether to generate cuts. The generated cuts are inserted into and returned in the collection of cuts cs.

If fullScan is !=0, the generator is obliged to call the CGL generateCuts routine. Otherwise, it is free to make a local decision. Negative fullScan says things like at integer solution The current implementation uses whenCutGenerator_ to decide.

The routine returns true if reoptimisation is needed (because the state of the solver interface has been modified).

If node then can find out depth

CbcCutGenerator& CbcCutGenerator::operator= ( const CbcCutGenerator rhs)

Assignment operator.

void CbcCutGenerator::refreshModel ( CbcModel model)

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

const char* CbcCutGenerator::cutGeneratorName ( ) const
inline

return name of generator

Definition at line 106 of file CbcCutGenerator.hpp.

void CbcCutGenerator::generateTuning ( FILE *  fp)

Create C++ lines to show how to tune.

void CbcCutGenerator::setHowOften ( int  value)

Set the cut generation interval.

Set the number of nodes evaluated between calls to the Cgl object's generateCuts routine.

If value is positive, cuts will always be generated at the specified interval. If value is negative, cuts will initially be generated at the specified interval, but Cbc may adjust the value depending on the success of cuts produced by this generator.

A value of -100 disables the generator, while a value of -99 means just at root.

int CbcCutGenerator::howOften ( ) const
inline

Get the cut generation interval.

Definition at line 129 of file CbcCutGenerator.hpp.

int CbcCutGenerator::howOftenInSub ( ) const
inline

Get the cut generation interval.in sub tree.

Definition at line 133 of file CbcCutGenerator.hpp.

int CbcCutGenerator::inaccuracy ( ) const
inline

Get level of cut inaccuracy (0 means exact e.g. cliques)

Definition at line 137 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setInaccuracy ( int  level)
inline

Set level of cut inaccuracy (0 means exact e.g. cliques)

Definition at line 141 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setWhatDepth ( int  value)

Set the cut generation depth.

Set the depth criterion for calls to the Cgl object's generateCuts routine. Only active if > 0.

If whenCutGenerator is positive and this is positive then this overrides. If whenCutGenerator is -1 then this is used as criterion if any cuts were generated at root node. If whenCutGenerator is anything else this is ignored.

void CbcCutGenerator::setWhatDepthInSub ( int  value)

Set the cut generation depth in sub tree.

int CbcCutGenerator::whatDepth ( ) const
inline

Get the cut generation depth criterion.

Definition at line 159 of file CbcCutGenerator.hpp.

int CbcCutGenerator::whatDepthInSub ( ) const
inline

Get the cut generation depth criterion.in sub tree.

Definition at line 163 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::normal ( ) const
inline

Get whether the cut generator should be called in the normal place.

Definition at line 168 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNormal ( bool  value)
inline

Set whether the cut generator should be called in the normal place.

Definition at line 172 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::atSolution ( ) const
inline

Get whether the cut generator should be called when a solution is found.

Definition at line 177 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setAtSolution ( bool  value)
inline

Set whether the cut generator should be called when a solution is found.

Definition at line 181 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::whenInfeasible ( ) const
inline

Get whether the cut generator should be called when the subproblem is found to be infeasible.

Definition at line 188 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setWhenInfeasible ( bool  value)
inline

Set whether the cut generator should be called when the subproblem is found to be infeasible.

Definition at line 194 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::timing ( ) const
inline

Get whether the cut generator is being timed.

Definition at line 199 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setTiming ( bool  value)
inline

Set whether the cut generator is being timed.

Definition at line 203 of file CbcCutGenerator.hpp.

double CbcCutGenerator::timeInCutGenerator ( ) const
inline

Return time taken in cut generator.

Definition at line 209 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementTimeInCutGenerator ( double  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 212 of file CbcCutGenerator.hpp.

CglCutGenerator* CbcCutGenerator::generator ( ) const
inline

Get the CglCutGenerator corresponding to this CbcCutGenerator.

Definition at line 216 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberTimesEntered ( ) const
inline

Number times cut generator entered.

Definition at line 220 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberTimesEntered ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 223 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberTimesEntered ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 226 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsInTotal ( ) const
inline

Total number of cuts added.

Definition at line 230 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberCutsInTotal ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 233 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberCutsInTotal ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 236 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberElementsInTotal ( ) const
inline

Total number of elements added.

Definition at line 240 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberElementsInTotal ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 243 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberElementsInTotal ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 246 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberColumnCuts ( ) const
inline

Total number of column cuts.

Definition at line 250 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberColumnCuts ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 253 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberColumnCuts ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 256 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsActive ( ) const
inline

Total number of cuts active after (at end of n cut passes at each node)

Definition at line 260 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberCutsActive ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 263 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberCutsActive ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 266 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setSwitchOffIfLessThan ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 269 of file CbcCutGenerator.hpp.

int CbcCutGenerator::switchOffIfLessThan ( ) const
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 272 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::needsOptimalBasis ( ) const
inline

Say if optimal basis needed.

Definition at line 276 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNeedsOptimalBasis ( bool  yesNo)
inline

Set if optimal basis needed.

Definition at line 280 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::mustCallAgain ( ) const
inline

Whether generator MUST be called again if any cuts (i.e. ignore break from loop)

Definition at line 285 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setMustCallAgain ( bool  yesNo)
inline

Set whether generator MUST be called again if any cuts (i.e. ignore break from loop)

Definition at line 289 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::switchedOff ( ) const
inline

Whether generator switched off for moment.

Definition at line 294 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setSwitchedOff ( bool  yesNo)
inline

Set whether generator switched off for moment.

Definition at line 298 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::ineffectualCuts ( ) const
inline

Whether last round of cuts did little.

Definition at line 303 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setIneffectualCuts ( bool  yesNo)
inline

Set whether last round of cuts did little.

Definition at line 307 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::whetherToUse ( ) const
inline

Whether to use if any cuts generated.

Definition at line 312 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setWhetherToUse ( bool  yesNo)
inline

Set whether to use if any cuts generated.

Definition at line 316 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsAtRoot ( ) const
inline

Number of cuts generated at root.

Definition at line 321 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberCutsAtRoot ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 324 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberActiveCutsAtRoot ( ) const
inline

Number of cuts active at root.

Definition at line 328 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberActiveCutsAtRoot ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 331 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberShortCutsAtRoot ( ) const
inline

Number of short cuts at root.

Definition at line 335 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setModel ( CbcModel model)
inline

Set model.

Definition at line 339 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::globalCutsAtRoot ( ) const
inline

Whether global cuts at root.

Definition at line 343 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setGlobalCutsAtRoot ( bool  yesNo)
inline

Set whether global cuts at root.

Definition at line 347 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::globalCuts ( ) const
inline

Whether global cuts.

Definition at line 352 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setGlobalCuts ( bool  yesNo)
inline

Set whether global cuts.

Definition at line 356 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::generateCuts ( OsiCuts &  cs,
int  fullScan,
OsiSolverInterface *  solver,
CbcNode node 
)

Generate cuts for the client model.

Evaluate the state of the client model and decide whether to generate cuts. The generated cuts are inserted into and returned in the collection of cuts cs.

If fullScan is !=0, the generator is obliged to call the CGL generateCuts routine. Otherwise, it is free to make a local decision. Negative fullScan says things like at integer solution The current implementation uses whenCutGenerator_ to decide.

The routine returns true if reoptimisation is needed (because the state of the solver interface has been modified).

If node then can find out depth

CbcCutGenerator& CbcCutGenerator::operator= ( const CbcCutGenerator rhs)

Assignment operator.

void CbcCutGenerator::refreshModel ( CbcModel model)

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

const char* CbcCutGenerator::cutGeneratorName ( ) const
inline

return name of generator

Definition at line 106 of file CbcCutGenerator.hpp.

void CbcCutGenerator::generateTuning ( FILE *  fp)

Create C++ lines to show how to tune.

void CbcCutGenerator::setHowOften ( int  value)

Set the cut generation interval.

Set the number of nodes evaluated between calls to the Cgl object's generateCuts routine.

If value is positive, cuts will always be generated at the specified interval. If value is negative, cuts will initially be generated at the specified interval, but Cbc may adjust the value depending on the success of cuts produced by this generator.

A value of -100 disables the generator, while a value of -99 means just at root.

int CbcCutGenerator::howOften ( ) const
inline

Get the cut generation interval.

Definition at line 129 of file CbcCutGenerator.hpp.

int CbcCutGenerator::howOftenInSub ( ) const
inline

Get the cut generation interval.in sub tree.

Definition at line 133 of file CbcCutGenerator.hpp.

int CbcCutGenerator::inaccuracy ( ) const
inline

Get level of cut inaccuracy (0 means exact e.g. cliques)

Definition at line 137 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setInaccuracy ( int  level)
inline

Set level of cut inaccuracy (0 means exact e.g. cliques)

Definition at line 141 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setWhatDepth ( int  value)

Set the cut generation depth.

Set the depth criterion for calls to the Cgl object's generateCuts routine. Only active if > 0.

If whenCutGenerator is positive and this is positive then this overrides. If whenCutGenerator is -1 then this is used as criterion if any cuts were generated at root node. If whenCutGenerator is anything else this is ignored.

void CbcCutGenerator::setWhatDepthInSub ( int  value)

Set the cut generation depth in sub tree.

int CbcCutGenerator::whatDepth ( ) const
inline

Get the cut generation depth criterion.

Definition at line 159 of file CbcCutGenerator.hpp.

int CbcCutGenerator::whatDepthInSub ( ) const
inline

Get the cut generation depth criterion.in sub tree.

Definition at line 163 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::normal ( ) const
inline

Get whether the cut generator should be called in the normal place.

Definition at line 168 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNormal ( bool  value)
inline

Set whether the cut generator should be called in the normal place.

Definition at line 172 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::atSolution ( ) const
inline

Get whether the cut generator should be called when a solution is found.

Definition at line 177 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setAtSolution ( bool  value)
inline

Set whether the cut generator should be called when a solution is found.

Definition at line 181 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::whenInfeasible ( ) const
inline

Get whether the cut generator should be called when the subproblem is found to be infeasible.

Definition at line 188 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setWhenInfeasible ( bool  value)
inline

Set whether the cut generator should be called when the subproblem is found to be infeasible.

Definition at line 194 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::timing ( ) const
inline

Get whether the cut generator is being timed.

Definition at line 199 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setTiming ( bool  value)
inline

Set whether the cut generator is being timed.

Definition at line 203 of file CbcCutGenerator.hpp.

double CbcCutGenerator::timeInCutGenerator ( ) const
inline

Return time taken in cut generator.

Definition at line 209 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementTimeInCutGenerator ( double  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 212 of file CbcCutGenerator.hpp.

CglCutGenerator* CbcCutGenerator::generator ( ) const
inline

Get the CglCutGenerator corresponding to this CbcCutGenerator.

Definition at line 216 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberTimesEntered ( ) const
inline

Number times cut generator entered.

Definition at line 220 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberTimesEntered ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 223 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberTimesEntered ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 226 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsInTotal ( ) const
inline

Total number of cuts added.

Definition at line 230 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberCutsInTotal ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 233 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberCutsInTotal ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 236 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberElementsInTotal ( ) const
inline

Total number of elements added.

Definition at line 240 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberElementsInTotal ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 243 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberElementsInTotal ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 246 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberColumnCuts ( ) const
inline

Total number of column cuts.

Definition at line 250 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberColumnCuts ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 253 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberColumnCuts ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 256 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsActive ( ) const
inline

Total number of cuts active after (at end of n cut passes at each node)

Definition at line 260 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberCutsActive ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 263 of file CbcCutGenerator.hpp.

void CbcCutGenerator::incrementNumberCutsActive ( int  value = 1)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 266 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setSwitchOffIfLessThan ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 269 of file CbcCutGenerator.hpp.

int CbcCutGenerator::switchOffIfLessThan ( ) const
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 272 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::needsOptimalBasis ( ) const
inline

Say if optimal basis needed.

Definition at line 276 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNeedsOptimalBasis ( bool  yesNo)
inline

Set if optimal basis needed.

Definition at line 280 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::mustCallAgain ( ) const
inline

Whether generator MUST be called again if any cuts (i.e. ignore break from loop)

Definition at line 285 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setMustCallAgain ( bool  yesNo)
inline

Set whether generator MUST be called again if any cuts (i.e. ignore break from loop)

Definition at line 289 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::switchedOff ( ) const
inline

Whether generator switched off for moment.

Definition at line 294 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setSwitchedOff ( bool  yesNo)
inline

Set whether generator switched off for moment.

Definition at line 298 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::ineffectualCuts ( ) const
inline

Whether last round of cuts did little.

Definition at line 303 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setIneffectualCuts ( bool  yesNo)
inline

Set whether last round of cuts did little.

Definition at line 307 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::whetherToUse ( ) const
inline

Whether to use if any cuts generated.

Definition at line 312 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setWhetherToUse ( bool  yesNo)
inline

Set whether to use if any cuts generated.

Definition at line 316 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsAtRoot ( ) const
inline

Number of cuts generated at root.

Definition at line 321 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberCutsAtRoot ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 324 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberActiveCutsAtRoot ( ) const
inline

Number of cuts active at root.

Definition at line 328 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setNumberActiveCutsAtRoot ( int  value)
inline

Set the client model.

In addition to setting the client model, refreshModel also calls the refreshSolver method of the CglCutGenerator object.

Definition at line 331 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberShortCutsAtRoot ( ) const
inline

Number of short cuts at root.

Definition at line 335 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setModel ( CbcModel model)
inline

Set model.

Definition at line 339 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::globalCutsAtRoot ( ) const
inline

Whether global cuts at root.

Definition at line 343 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setGlobalCutsAtRoot ( bool  yesNo)
inline

Set whether global cuts at root.

Definition at line 347 of file CbcCutGenerator.hpp.

bool CbcCutGenerator::globalCuts ( ) const
inline

Whether global cuts.

Definition at line 352 of file CbcCutGenerator.hpp.

void CbcCutGenerator::setGlobalCuts ( bool  yesNo)
inline

Set whether global cuts.

Definition at line 356 of file CbcCutGenerator.hpp.

Member Data Documentation

OsiCuts CbcCutGenerator::savedCuts_
private

Saved cuts.

Definition at line 367 of file CbcCutGenerator.hpp.

double CbcCutGenerator::timeInCutGenerator_
private

Time in cut generator.

Definition at line 369 of file CbcCutGenerator.hpp.

CbcModel * CbcCutGenerator::model_
private

The client model.

Definition at line 371 of file CbcCutGenerator.hpp.

CglCutGenerator * CbcCutGenerator::generator_
private

Definition at line 374 of file CbcCutGenerator.hpp.

char * CbcCutGenerator::generatorName_
private

Name of generator.

Definition at line 377 of file CbcCutGenerator.hpp.

int CbcCutGenerator::whenCutGenerator_
private

Number of nodes between calls to the CglCutGenerator::generateCuts routine.

Definition at line 382 of file CbcCutGenerator.hpp.

int CbcCutGenerator::whenCutGeneratorInSub_
private

Number of nodes between calls to the CglCutGenerator::generateCuts routine in sub tree.

Definition at line 386 of file CbcCutGenerator.hpp.

int CbcCutGenerator::switchOffIfLessThan_
private

If first pass at root produces fewer than this cuts then switch off.

Definition at line 389 of file CbcCutGenerator.hpp.

int CbcCutGenerator::depthCutGenerator_
private

Depth at which to call the CglCutGenerator::generateCuts routine (If >0 then overrides when and is called if depthdepthCutGenerator==0).

Definition at line 394 of file CbcCutGenerator.hpp.

int CbcCutGenerator::depthCutGeneratorInSub_
private

Depth at which to call the CglCutGenerator::generateCuts routine (If >0 then overrides when and is called if depthdepthCutGenerator==0).

In sub tree.

Definition at line 400 of file CbcCutGenerator.hpp.

int CbcCutGenerator::inaccuracy_
private

Level of cut inaccuracy (0 means exact e.g. cliques)

Definition at line 403 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberTimes_
private

Number times cut generator entered.

Definition at line 405 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCuts_
private

Total number of cuts added.

Definition at line 407 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberElements_
private

Total number of elements added.

Definition at line 409 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberColumnCuts_
private

Total number of column cuts added.

Definition at line 411 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsActive_
private

Total number of cuts active after (at end of n cut passes at each node)

Definition at line 413 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberCutsAtRoot_
private

Number of cuts generated at root.

Definition at line 415 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberActiveCutsAtRoot_
private

Number of cuts active at root.

Definition at line 417 of file CbcCutGenerator.hpp.

int CbcCutGenerator::numberShortCutsAtRoot_
private

Number of short cuts at root.

Definition at line 419 of file CbcCutGenerator.hpp.

int CbcCutGenerator::switches_
private

Switches - see gets and sets.

Definition at line 421 of file CbcCutGenerator.hpp.


The documentation for this class was generated from the following files: