6 #ifndef CbcCutGenerator_H
7 #define CbcCutGenerator_H
81 int howOften = 1,
const char *name = NULL,
83 bool infeasible =
false,
int howOftenInsub = -100,
543 #define SCANCUTS 1000
545 #define SCANCUTS_PROBING 1000
bool atSolution() const
Get whether the cut generator should be called when a solution is found.
void setInaccuracy(int level)
Set level of cut inaccuracy (0 means exact e.g. cliques)
OsiCuts savedCuts_
Saved cuts.
int whatDepth() const
Get the cut generation depth criterion.
int numberCutsAtRoot() const
Number of cuts generated at root.
bool whenInfeasible() const
Get whether the cut generator should be called when the subproblem is found to be infeasible...
void setIneffectualCuts(bool yesNo)
Set whether last round of cuts did little.
int switches_
Switches - see gets and sets.
int maximumTries() const
Get maximum number of times to enter.
void setWhatDepthInSub(int value)
Set the cut generation depth in sub tree.
void incrementNumberCutsInTotal(int value=1)
Set the client model.
void setSwitchedOff(bool yesNo)
Set whether generator switched off for moment.
int depthCutGenerator_
Depth at which to call the CglCutGenerator::generateCuts routine (If >0 then overrides when and is ca...
int maximumTries_
Maximum number of times to enter.
bool globalCutsAtRoot() const
Whether global cuts at root.
int numberShortCutsAtRoot() const
Number of short cuts at root.
void setNumberColumnCuts(int value)
Set the client model.
void refreshModel(CbcModel *model)
Set the client model.
bool whetherCallAtEnd() const
Whether to call at end.
CbcModel * model_
The client model.
void setGlobalCutsAtRoot(bool yesNo)
Set whether global cuts at root.
void setNeedsRefresh(bool yesNo)
Set whether needs refresh on copy.
void setNumberElementsInTotal(int value)
Set the client model.
int numberCutsAtRoot_
Number of cuts generated at root.
void setGlobalCuts(bool yesNo)
Set whether global cuts.
void setMustCallAgain(bool yesNo)
Set whether generator MUST be called again if any cuts (i.e. ignore break from loop) ...
double timeInCutGenerator() const
Return time taken in cut generator.
CbcCutGenerator()
Default constructor.
int numberCutsActive_
Total number of cuts active after (at end of n cut passes at each node)
int numberActiveCutsAtRoot() const
Number of cuts active at root.
double timeInCutGenerator_
Time in cut generator.
void setNumberCutsInTotal(int value)
Set the client model.
int numberTimes_
Number times cut generator entered.
void setNumberShortCutsAtRoot(int value)
Set the client model.
bool ineffectualCuts() const
Whether last round of cuts did little.
int numberCuts_
Total number of cuts added.
Collections of row cuts and column cuts.
bool whetherInMustCallAgainMode() const
Whether in must call again mode (or after others)
void scaleBackStatistics(int factor)
Scale back statistics by factor.
int inaccuracy() const
Get level of cut inaccuracy (0 means exact e.g. cliques)
bool normal() const
Get whether the cut generator should be called in the normal place.
void setSwitchOffIfLessThan(int value)
Set the client model.
void setTiming(bool value)
Set whether the cut generator is being timed.
int numberActiveCutsAtRoot_
Number of cuts active at root.
int numberColumnCuts() const
Total number of column cuts.
int numberCutsInTotal() const
Total number of cuts added.
void addStatistics(const CbcCutGenerator *other)
Add in statistics from other.
void setWhenInfeasible(bool value)
Set whether the cut generator should be called when the subproblem is found to be infeasible...
void setWhetherToUse(bool yesNo)
Set whether to use if any cuts generated.
void setAtSolution(bool value)
Set whether the cut generator should be called when a solution is found.
void setNormal(bool value)
Set whether the cut generator should be called in the normal place.
bool generateCuts(OsiCuts &cs, int fullScan, OsiSolverInterface *solver, CbcNode *node)
Generate cuts for the client model.
int depthCutGeneratorInSub_
Depth at which to call the CglCutGenerator::generateCuts routine (If >0 then overrides when and is ca...
const char * cutGeneratorName() const
return name of generator
bool globalCuts() const
Whether global cuts.
int switchOffIfLessThan_
If first pass at root produces fewer than this cuts then switch off.
void setWhatDepth(int value)
Set the cut generation depth.
Abstract Base Class for describing an interface to a solver.
int switchOffIfLessThan() const
Set the client model.
void setNeedsOptimalBasis(bool yesNo)
Set if optimal basis needed.
Cut Generator Base Class.
int howOften() const
Get the cut generation interval.
CglCutGenerator * generator() const
Get the CglCutGenerator corresponding to this CbcCutGenerator.
int whenCutGeneratorInSub_
Number of nodes between calls to the CglCutGenerator::generateCuts routine in sub tree...
void setNumberActiveCutsAtRoot(int value)
Set the client model.
CbcCutGenerator & operator=(const CbcCutGenerator &rhs)
Assignment operator.
void setModel(CbcModel *model)
Set model.
int switches() const
Get switches.
Validate cuts against a known solution.
int numberTimesEntered() const
Number times cut generator entered.
void setWhetherCallAtEnd(bool yesNo)
Set whether to call at end.
CglCutGenerator * generator_
void setNumberTimesEntered(int value)
Set the client model.
bool timing() const
Get whether the cut generator is being timed.
void generateTuning(FILE *fp)
Create C++ lines to show how to tune.
int whatDepthInSub() const
Get the cut generation depth criterion.in sub tree.
int whenCutGenerator_
Number of nodes between calls to the CglCutGenerator::generateCuts routine.
void setMaximumTries(int value)
Set maximum number of times to enter.
bool whetherToUse() const
Whether to use if any cuts generated.
int howOftenInSub() const
Get the cut generation interval.in sub tree.
Information required while the node is live.
void incrementNumberTimesEntered(int value=1)
Set the client model.
void incrementNumberElementsInTotal(int value=1)
Set the client model.
int numberElements_
Total number of elements added.
int numberColumnCuts_
Total number of column cuts added.
int numberShortCutsAtRoot_
Number of short cuts at root.
int numberElementsInTotal() const
Total number of elements added.
bool mustCallAgain() const
Whether generator MUST be called again if any cuts (i.e. ignore break from loop)
void setNumberCutsActive(int value)
Set the client model.
void incrementNumberCutsActive(int value=1)
Set the client model.
bool needsRefresh() const
Whether needs refresh on copy.
int inaccuracy_
Level of cut inaccuracy (0 means exact e.g. cliques)
void setSwitches(int value)
Set switches (for copying from virgin state)
char * generatorName_
Name of generator.
bool switchedOff() const
Whether generator switched off for moment.
void setHowOften(int value)
Set the cut generation interval.
void incrementNumberColumnCuts(int value=1)
Set the client model.
int numberCutsActive() const
Total number of cuts active after (at end of n cut passes at each node)
void setWhetherInMustCallAgainMode(bool yesNo)
Set whether in must call again mode (or after others)
void setNumberCutsAtRoot(int value)
Set the client model.
void incrementTimeInCutGenerator(double value)
Set the client model.
~CbcCutGenerator()
Destructor.
bool needsOptimalBasis() const
Say if optimal basis needed.
Simple Branch and bound class.
Interface between Cbc and Cut Generation Library.