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