#include <CbcHeuristic.hpp>
Inheritance diagram for CbcHeuristic:
Public Member Functions | |
CbcHeuristic () | |
CbcHeuristic (CbcModel &model) | |
virtual | ~CbcHeuristic () |
virtual void | setModel (CbcModel *model) |
update model (This is needed if cliques update matrix etc) | |
virtual CbcHeuristic * | clone () const =0 |
Clone. | |
virtual void | resetModel (CbcModel *model)=0 |
Resets stuff if model changes. | |
virtual int | solution (double &objectiveValue, double *newSolution)=0 |
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 This is called after cuts have been added - so can not add cuts | |
virtual int | solution (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 | |
virtual void | validate () |
Validate model i.e. sets when_ to 0 if necessary (may be NULL). | |
void | setWhen (int value) |
Sets "when" flag - 0 off, 1 at root, 2 other than root, 3 always. | |
int | when () const |
Gets "when" flag - 0 off, 1 at root, 2 other than root, 3 always. | |
int | smallBranchAndBound (OsiSolverInterface *solver, int numberNodes, double *newSolution, double &newSolutionValue, double cutoff, std::string name) const |
Do mini branch and bound (return 1 if solution). | |
virtual void | generateCpp (FILE *fp) |
Create C++ lines to get to current state. | |
Protected Attributes | |
CbcModel * | model_ |
Model. | |
int | when_ |
When flag - 0 off, 1 at root, 2 other than root, 3 always. | |
Private Member Functions | |
CbcHeuristic & | operator= (const CbcHeuristic &rhs) |
Illegal Assignment operator. |
Definition at line 18 of file CbcHeuristic.hpp.
|
|
|
|
|
|
|
update model (This is needed if cliques update matrix etc)
Reimplemented in CbcRounding, CbcSerendipity, CbcHeuristicFPump, CbcHeuristicGreedyCover, CbcHeuristicGreedyEquality, and CbcHeuristicLocal. |
|
Clone.
Implemented in CbcRounding, CbcSerendipity, CbcHeuristicFPump, CbcHeuristicGreedyCover, CbcHeuristicGreedyEquality, and CbcHeuristicLocal. |
|
Resets stuff if model changes.
Implemented in CbcRounding, CbcSerendipity, CbcHeuristicFPump, CbcHeuristicGreedyCover, CbcHeuristicGreedyEquality, and CbcHeuristicLocal. |
|
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 This is called after cuts have been added - so can not add cuts
Implemented in CbcRounding, CbcSerendipity, CbcHeuristicFPump, CbcHeuristicGreedyCover, CbcHeuristicGreedyEquality, and CbcHeuristicLocal. |
|
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
Definition at line 52 of file CbcHeuristic.hpp. |
|
Validate model i.e. sets when_ to 0 if necessary (may be NULL).
Reimplemented in CbcRounding, CbcHeuristicGreedyCover, and CbcHeuristicGreedyEquality. Definition at line 57 of file CbcHeuristic.hpp. |
|
Sets "when" flag - 0 off, 1 at root, 2 other than root, 3 always. If 10 added then don't worry if validate says there are funny objects as user knows it will be fine Definition at line 63 of file CbcHeuristic.hpp. |
|
Gets "when" flag - 0 off, 1 at root, 2 other than root, 3 always.
Definition at line 66 of file CbcHeuristic.hpp. |
|
Do mini branch and bound (return 1 if solution).
|
|
Create C++ lines to get to current state.
Reimplemented in CbcRounding, CbcSerendipity, CbcHeuristicFPump, CbcHeuristicGreedyCover, CbcHeuristicGreedyEquality, and CbcHeuristicLocal. Definition at line 74 of file CbcHeuristic.hpp. |
|
Illegal Assignment operator.
|
|
Model.
Definition at line 79 of file CbcHeuristic.hpp. |
|
When flag - 0 off, 1 at root, 2 other than root, 3 always.
Definition at line 81 of file CbcHeuristic.hpp. |