Blis 0.95.0
|
Rounding Heuristic. More...
#include <BlisHeurRound.h>
Public Member Functions | |
BlisHeurRound () | |
Default Constructor. | |
BlisHeurRound (BlisModel *model, const char *name, BlisHeurStrategy strategy, int freq) | |
Constructor with model - assumed before cuts. | |
~BlisHeurRound () | |
Destructor. | |
BlisHeurRound (const BlisHeurRound &) | |
Copy constructor. | |
virtual BlisHeuristic * | clone () const |
Clone a rounding heuristic. | |
virtual void | setModel (BlisModel *model) |
update model (This is needed if cliques update matrix etc). | |
virtual bool | searchSolution (double &objectiveValue, double *newSolution) |
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts | |
void | setSeed (int value) |
Set seed. | |
![]() | |
BlisHeuristic () | |
Default Constructor. | |
BlisHeuristic (BlisModel *model, const char *name, BlisHeurStrategy strategy, int heurCallFrequency) | |
Useful constructor. | |
virtual | ~BlisHeuristic () |
Distructor. | |
BlisHeuristic (const BlisHeuristic &rhs) | |
Copy constructor. | |
virtual void | setStrategy (BlisHeurStrategy strategy) |
Get/set strategy. | |
virtual BlisHeurStrategy | strategy () const |
virtual void | setHeurCallFrequency (int freq) |
Get/set call frequency. | |
virtual int | heurCallFrequency () const |
virtual bool | searchSolution (double &objectiveValue, double *newSolution, OsiCuts &cs) |
returns 0 if no solution, 1 if valid solution, -1 if just returning an estimate of best possible solution with better objective value than one passed in Sets solution values if good, sets objective value (only if nonzero code) This is called at same time as cut generators - so can add cuts Default is do nothing | |
const char * | name () const |
return name of generator. | |
void | addNumSolutions (int num=1) |
Record number of solutions found. | |
int | numSolutions () const |
Number of solutions found. | |
void | addTime (double t=0.0) |
Record Cpu time used. | |
double | time () const |
Cpu time used. | |
void | addCalls (int c=1) |
Record number of times called. | |
int | calls () const |
Number of times called. | |
int | noSolCalls () const |
Number called and no cons found. | |
void | addNoSolCalls (int n=1) |
Increase the number of no cons called. | |
Protected Attributes | |
CoinPackedMatrix | matrix_ |
Column majored matrix. | |
CoinPackedMatrix | matrixByRow_ |
Row majored matrix. | |
int | seed_ |
Seed for random stuff. | |
![]() | |
BlisModel * | model_ |
Pointer to the model. | |
char * | name_ |
Heuristics name. | |
BlisHeurStrategy | strategy_ |
When to call findSolution() routine. | |
int | heurCallFrequency_ |
The frequency with which to call the heuristic. | |
int | numSolutions_ |
Number of solutions found. | |
double | time_ |
Used CPU/User time. | |
int | calls_ |
The times of calling this heuristic. | |
int | noSolsCalls_ |
The times of calling this heuristic and no solutions found. | |
Rounding Heuristic.
Definition at line 45 of file BlisHeurRound.h.
|
inline |
Default Constructor.
Definition at line 62 of file BlisHeurRound.h.
|
inline |
Constructor with model - assumed before cuts.
Definition at line 65 of file BlisHeurRound.h.
|
inline |
Destructor.
Definition at line 74 of file BlisHeurRound.h.
BlisHeurRound::BlisHeurRound | ( | const BlisHeurRound & | ) |
Copy constructor.
|
virtual |
Clone a rounding heuristic.
Reimplemented from BlisHeuristic.
|
virtual |
update model (This is needed if cliques update matrix etc).
Reimplemented from BlisHeuristic.
|
virtual |
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts
Implements BlisHeuristic.
|
inline |
Set seed.
Definition at line 95 of file BlisHeurRound.h.
|
protected |
Column majored matrix.
Definition at line 52 of file BlisHeurRound.h.
|
protected |
Row majored matrix.
Definition at line 55 of file BlisHeurRound.h.
|
protected |
Seed for random stuff.
Definition at line 58 of file BlisHeurRound.h.