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