#include <CbcHeuristicGreedy.hpp>
Inheritance diagram for CbcHeuristicGreedyEquality:
Public Member Functions | |
CbcHeuristicGreedyEquality () | |
CbcHeuristicGreedyEquality (CbcModel &model) | |
CbcHeuristicGreedyEquality (const CbcHeuristicGreedyEquality &) | |
~CbcHeuristicGreedyEquality () | |
virtual CbcHeuristic * | clone () const |
Clone. | |
virtual void | generateCpp (FILE *fp) |
Create C++ lines to get to current state. | |
virtual void | setModel (CbcModel *model) |
update model (This is needed if cliques update matrix etc) | |
virtual int | solution (double &objectiveValue, double *newSolution) |
returns 0 if no solution, 1 if valid solution. | |
virtual void | validate () |
Validate model i.e. sets when_ to 0 if necessary (may be NULL). | |
virtual void | resetModel (CbcModel *model) |
Resets stuff if model changes. | |
int | algorithm () const |
void | setAlgorithm (int value) |
void | setFraction (double value) |
double | fraction () const |
int | numberTimes () const |
void | setNumberTimes (int value) |
Protected Attributes | |
CoinPackedMatrix | matrix_ |
double | fraction_ |
int | originalNumberRows_ |
int | algorithm_ |
int | numberTimes_ |
Do this many times. | |
Private Member Functions | |
CbcHeuristicGreedyEquality & | operator= (const CbcHeuristicGreedyEquality &rhs) |
Illegal Assignment operator. |
|
|
|
|
|
|
|
|
|
Clone.
Implements CbcHeuristic. |
|
Create C++ lines to get to current state.
Reimplemented from CbcHeuristic. |
|
update model (This is needed if cliques update matrix etc)
Reimplemented from CbcHeuristic. |
|
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. |
|
Validate model i.e. sets when_ to 0 if necessary (may be NULL).
Reimplemented from CbcHeuristic. |
|
Resets stuff if model changes.
Implements CbcHeuristic. |
|
Definition at line 136 of file CbcHeuristicGreedy.hpp. |
|
Definition at line 138 of file CbcHeuristicGreedy.hpp. References algorithm_. |
|
Definition at line 141 of file CbcHeuristicGreedy.hpp. References fraction_. |
|
Definition at line 143 of file CbcHeuristicGreedy.hpp. |
|
Definition at line 146 of file CbcHeuristicGreedy.hpp. |
|
Definition at line 148 of file CbcHeuristicGreedy.hpp. References numberTimes_. |
|
Illegal Assignment operator.
|
|
Definition at line 154 of file CbcHeuristicGreedy.hpp. |
|
Definition at line 156 of file CbcHeuristicGreedy.hpp. Referenced by setFraction(). |
|
Definition at line 158 of file CbcHeuristicGreedy.hpp. |
|
Definition at line 164 of file CbcHeuristicGreedy.hpp. Referenced by setAlgorithm(). |
|
Do this many times.
Definition at line 166 of file CbcHeuristicGreedy.hpp. Referenced by setNumberTimes(). |