heuristic - just picks up any good solution More...
#include <CbcLinked.hpp>
Public Member Functions | |
CbcHeuristicDynamic3 () | |
CbcHeuristicDynamic3 (CbcModel &model) | |
CbcHeuristicDynamic3 (const CbcHeuristicDynamic3 &) | |
~CbcHeuristicDynamic3 () | |
virtual CbcHeuristic * | clone () const |
Clone. | |
virtual void | setModel (CbcModel *model) |
update model | |
virtual int | solution (double &objectiveValue, double *newSolution) |
returns 0 if no solution, 1 if valid solution. | |
virtual void | resetModel (CbcModel *model) |
Resets stuff if model changes. | |
virtual bool | canDealWithOdd () const |
Returns true if can deal with "odd" problems e.g. sos type 2. | |
Private Member Functions | |
CbcHeuristicDynamic3 & | operator= (const CbcHeuristicDynamic3 &rhs) |
Illegal Assignment operator. |
heuristic - just picks up any good solution
Definition at line 357 of file CbcLinked.hpp.
CbcHeuristicDynamic3::CbcHeuristicDynamic3 | ( | ) |
CbcHeuristicDynamic3::CbcHeuristicDynamic3 | ( | CbcModel & | model | ) |
CbcHeuristicDynamic3::CbcHeuristicDynamic3 | ( | const CbcHeuristicDynamic3 & | ) |
CbcHeuristicDynamic3::~CbcHeuristicDynamic3 | ( | ) |
virtual CbcHeuristic* CbcHeuristicDynamic3::clone | ( | ) | const [virtual] |
Clone.
Implements CbcHeuristic.
virtual void CbcHeuristicDynamic3::setModel | ( | CbcModel * | model | ) | [virtual] |
update model
Reimplemented from CbcHeuristic.
virtual int CbcHeuristicDynamic3::solution | ( | double & | objectiveValue, | |
double * | newSolution | |||
) | [virtual] |
returns 0 if no solution, 1 if valid solution.
Sets solution values if good, sets objective value (only if good) We leave all variables which are at one at this node of the tree to that value and will initially set all others to zero. We then sort all variables in order of their cost divided by the number of entries in rows which are not yet covered. We randomize that value a bit so that ties will be broken in different ways on different runs of the heuristic. We then choose the best one and set it to one and repeat the exercise.
Implements CbcHeuristic.
virtual void CbcHeuristicDynamic3::resetModel | ( | CbcModel * | model | ) | [virtual] |
Resets stuff if model changes.
Implements CbcHeuristic.
virtual bool CbcHeuristicDynamic3::canDealWithOdd | ( | ) | const [inline, virtual] |
Returns true if can deal with "odd" problems e.g. sos type 2.
Reimplemented from CbcHeuristic.
Definition at line 395 of file CbcLinked.hpp.
CbcHeuristicDynamic3& CbcHeuristicDynamic3::operator= | ( | const CbcHeuristicDynamic3 & | rhs | ) | [private] |
Illegal Assignment operator.
Reimplemented from CbcHeuristic.