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