Go to the documentation of this file.
30 #ifndef BlisConGenerator_h_
31 #define BlisConGenerator_h_
33 #include "OsiSolverInterface.hpp"
34 #include "OsiCuts.hpp"
40 class OsiRowCutDebugger;
133 {
name_ =
"UNKNOWN"; }
138 const char *
name = NULL,
143 bool infeasible =
false);
void refreshModel(BlisModel *model)
Refresh the model.
bool atSolution_
Whether to call the generator when a new solution is found.
Interface between Blis and Cut Generation Library.
void setNormal(bool value)
Set whether the con generator should be called in the normal place.
BlisConGenerator & operator=(const BlisConGenerator &rhs)
Assignment operator.
void addNumConsGenerated(int n)
Increase the number of generated cons.
int calls_
The times of calling this generator.
double time_
Used CPU/User time.
CglCutGenerator * generator() const
Get the CglCutGenerator bound to this BlisConGenerator.
BlisCutStrategy strategy_
When to call CglCutGenerator::generateCuts routine.
BlisConGenerator(BlisModel *model, CglCutGenerator *generator, const char *name=NULL, BlisCutStrategy strategy=BlisCutStrategyAuto, int cutGenerationFrequency_=1, bool normal=true, bool atSolution=false, bool infeasible=false)
Useful constructor.
void addTime(double t)
Increase Cpu time used.
int noConsCalls() const
Number called and no cons found.
double time() const
Cpu time used.
void setCutGenerationFreq(int freq)
Set the con generation strategy.
void addCalls(int n=1)
Increase the number of called.
void setStrategy(BlisCutStrategy value)
Set the con generation strategy.
virtual bool generateConstraints(BcpsConstraintPool &conPool)
Generate cons for the client model.
bool atSolution() const
Get whether the con generator should be called when a solution is found.
bool whenInfeasible() const
Get whether the con generator should be called when the subproblem is found to be infeasible.
int calls() const
Number called.
BlisCutStrategy strategy() const
Get the con generation interval.
void setWhenInfeasible(bool value)
Set whether the con generator should be called when the subproblem is found to be infeasible.
void setAtSolution(bool value)
Set whether the con generator should be called when a solution is found.
bool whenInfeasible_
Whether to call generator when a subproblem is found to be infeasible.
int numConsUsed()
Get number of used cons.
void setModel(BlisModel *m)
Set the model.
void addNoConsCalls(int n=1)
Increase the number of no cons called.
CglCutGenerator * generator_
The CglCutGenerator object.
BlisModel * model_
The client model.
int noConsCalls_
The times of calling this generator and no cons found.
void addNumConsUsed(int n)
Increase the number of generated cons.
int numConsGenerated_
Number of cons generated.
virtual ~BlisConGenerator()
Destructor.
BlisConGenerator(const BlisConGenerator &)
Copy constructor.
BlisConGenerator()
Default constructor.
BlisModel * getModel()
Set the client model.
bool normal() const
Get whether the con generator should be called in the normal place.
void setName(const char *str)
return name of generator.
int cutGenerationFreq() const
Get the con generation interval.
int numConsGenerated()
Get number of generated cons.
int cutGenerationFrequency_
The frequency of calls to the cut generator.
std::string name() const
return name of generator.
std::string name_
Name of generator.
int numConsUsed_
Number of cons used.
bool normal_
Whether to call the generator in the normal place.