Just One class - this chooses one at random. More...
#include <CbcHeuristic.hpp>
Public Member Functions | |
CbcHeuristicJustOne () | |
CbcHeuristicJustOne (CbcModel &model) | |
CbcHeuristicJustOne (const CbcHeuristicJustOne &) | |
~CbcHeuristicJustOne () | |
virtual CbcHeuristicJustOne * | clone () const |
Clone. | |
CbcHeuristicJustOne & | operator= (const CbcHeuristicJustOne &rhs) |
Assignment operator. | |
virtual void | generateCpp (FILE *fp) |
Create C++ lines to get to current state. | |
virtual int | solution (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 This does Fractional Diving | |
virtual void | resetModel (CbcModel *model) |
Resets stuff if model changes. | |
virtual void | setModel (CbcModel *model) |
update model (This is needed if cliques update matrix etc) | |
virtual bool | selectVariableToBranch (OsiSolverInterface *, const double *, int &, int &) |
Selects the next variable to branch on. | |
virtual void | validate () |
Validate model i.e. sets when_ to 0 if necessary (may be NULL). | |
void | addHeuristic (const CbcHeuristic *heuristic, double probability) |
Adds an heuristic with probability. | |
void | normalizeProbabilities () |
Normalize probabilities. | |
CbcHeuristicJustOne () | |
CbcHeuristicJustOne (CbcModel &model) | |
CbcHeuristicJustOne (const CbcHeuristicJustOne &) | |
~CbcHeuristicJustOne () | |
virtual CbcHeuristicJustOne * | clone () const |
Clone. | |
CbcHeuristicJustOne & | operator= (const CbcHeuristicJustOne &rhs) |
Assignment operator. | |
virtual void | generateCpp (FILE *fp) |
Create C++ lines to get to current state. | |
virtual int | solution (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 This does Fractional Diving | |
virtual void | resetModel (CbcModel *model) |
Resets stuff if model changes. | |
virtual void | setModel (CbcModel *model) |
update model (This is needed if cliques update matrix etc) | |
virtual bool | selectVariableToBranch (OsiSolverInterface *, const double *, int &, int &) |
Selects the next variable to branch on. | |
virtual void | validate () |
Validate model i.e. sets when_ to 0 if necessary (may be NULL). | |
void | addHeuristic (const CbcHeuristic *heuristic, double probability) |
Adds an heuristic with probability. | |
void | normalizeProbabilities () |
Normalize probabilities. | |
Protected Attributes | |
double * | probabilities_ |
CbcHeuristic ** | heuristic_ |
int | numberHeuristics_ |
Just One class - this chooses one at random.
Definition at line 580 of file CbcHeuristic.hpp.
CbcHeuristicJustOne::CbcHeuristicJustOne | ( | ) |
CbcHeuristicJustOne::CbcHeuristicJustOne | ( | CbcModel & | model | ) |
CbcHeuristicJustOne::CbcHeuristicJustOne | ( | const CbcHeuristicJustOne & | ) |
CbcHeuristicJustOne::~CbcHeuristicJustOne | ( | ) |
CbcHeuristicJustOne::CbcHeuristicJustOne | ( | ) |
CbcHeuristicJustOne::CbcHeuristicJustOne | ( | CbcModel & | model | ) |
CbcHeuristicJustOne::CbcHeuristicJustOne | ( | const CbcHeuristicJustOne & | ) |
CbcHeuristicJustOne::~CbcHeuristicJustOne | ( | ) |
virtual CbcHeuristicJustOne* CbcHeuristicJustOne::clone | ( | ) | const [virtual] |
Clone.
Implements CbcHeuristic.
CbcHeuristicJustOne& CbcHeuristicJustOne::operator= | ( | const CbcHeuristicJustOne & | rhs | ) |
Assignment operator.
virtual void CbcHeuristicJustOne::generateCpp | ( | FILE * | fp | ) | [virtual] |
Create C++ lines to get to current state.
Reimplemented from CbcHeuristic.
virtual int CbcHeuristicJustOne::solution | ( | double & | objectiveValue, | |
double * | newSolution | |||
) | [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 This does Fractional Diving
Implements CbcHeuristic.
virtual void CbcHeuristicJustOne::resetModel | ( | CbcModel * | model | ) | [virtual] |
Resets stuff if model changes.
Implements CbcHeuristic.
virtual void CbcHeuristicJustOne::setModel | ( | CbcModel * | model | ) | [virtual] |
update model (This is needed if cliques update matrix etc)
Reimplemented from CbcHeuristic.
virtual bool CbcHeuristicJustOne::selectVariableToBranch | ( | OsiSolverInterface * | , | |
const double * | , | |||
int & | , | |||
int & | ||||
) | [inline, virtual] |
Selects the next variable to branch on.
Returns true if all the fractional variables can be trivially rounded. Returns false, if there is at least one fractional variable that is not trivially roundable. In this case, the bestColumn returned will not be trivially roundable. This is dummy as never called
Definition at line 624 of file CbcHeuristic.hpp.
virtual void CbcHeuristicJustOne::validate | ( | ) | [virtual] |
Validate model i.e. sets when_ to 0 if necessary (may be NULL).
Reimplemented from CbcHeuristic.
void CbcHeuristicJustOne::addHeuristic | ( | const CbcHeuristic * | heuristic, | |
double | probability | |||
) |
Adds an heuristic with probability.
void CbcHeuristicJustOne::normalizeProbabilities | ( | ) |
Normalize probabilities.
virtual CbcHeuristicJustOne* CbcHeuristicJustOne::clone | ( | ) | const [virtual] |
Clone.
Implements CbcHeuristic.
CbcHeuristicJustOne& CbcHeuristicJustOne::operator= | ( | const CbcHeuristicJustOne & | rhs | ) |
Assignment operator.
virtual void CbcHeuristicJustOne::generateCpp | ( | FILE * | fp | ) | [virtual] |
Create C++ lines to get to current state.
Reimplemented from CbcHeuristic.
virtual int CbcHeuristicJustOne::solution | ( | double & | objectiveValue, | |
double * | newSolution | |||
) | [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 This does Fractional Diving
Implements CbcHeuristic.
virtual void CbcHeuristicJustOne::resetModel | ( | CbcModel * | model | ) | [virtual] |
Resets stuff if model changes.
Implements CbcHeuristic.
virtual void CbcHeuristicJustOne::setModel | ( | CbcModel * | model | ) | [virtual] |
update model (This is needed if cliques update matrix etc)
Reimplemented from CbcHeuristic.
virtual bool CbcHeuristicJustOne::selectVariableToBranch | ( | OsiSolverInterface * | , | |
const double * | , | |||
int & | , | |||
int & | ||||
) | [inline, virtual] |
Selects the next variable to branch on.
Returns true if all the fractional variables can be trivially rounded. Returns false, if there is at least one fractional variable that is not trivially roundable. In this case, the bestColumn returned will not be trivially roundable. This is dummy as never called
Definition at line 624 of file CbcHeuristic.hpp.
virtual void CbcHeuristicJustOne::validate | ( | ) | [virtual] |
Validate model i.e. sets when_ to 0 if necessary (may be NULL).
Reimplemented from CbcHeuristic.
void CbcHeuristicJustOne::addHeuristic | ( | const CbcHeuristic * | heuristic, | |
double | probability | |||
) |
Adds an heuristic with probability.
void CbcHeuristicJustOne::normalizeProbabilities | ( | ) |
Normalize probabilities.
double * CbcHeuristicJustOne::probabilities_ [protected] |
Definition at line 640 of file CbcHeuristic.hpp.
CbcHeuristic ** CbcHeuristicJustOne::heuristic_ [protected] |
Definition at line 643 of file CbcHeuristic.hpp.
int CbcHeuristicJustOne::numberHeuristics_ [protected] |
Definition at line 646 of file CbcHeuristic.hpp.