A heuristic that stores the initial solution of the NLP. More...
#include <BonInitHeuristic.hpp>
Public Member Functions | |
InitHeuristic (double objValue, const double *sol, CouenneProblem &cp) | |
Constructor with model and Ipopt problems. More... | |
InitHeuristic (const InitHeuristic &other) | |
Copy constructor. More... | |
virtual | ~InitHeuristic () |
Destructor. More... | |
virtual CbcHeuristic * | clone () const |
Clone. More... | |
InitHeuristic & | operator= (const InitHeuristic &rhs) |
Assignment operator. More... | |
virtual void | resetModel (CbcModel *model) |
virtual int | solution (double &objectiveValue, double *newSolution) |
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise. More... | |
Private Member Functions | |
InitHeuristic () | |
Default constructor. More... | |
Private Attributes | |
double | objValue_ |
objective function value from initial solve More... | |
double * | sol_ |
point from initial solve More... | |
int | nVars_ |
Size of array sol. More... | |
A heuristic that stores the initial solution of the NLP.
This is computed before Cbc is started, and in this way we can tell Cbc about this.
Definition at line 24 of file BonInitHeuristic.hpp.
InitHeuristic::InitHeuristic | ( | double | objValue, |
const double * | sol, | ||
CouenneProblem & | cp | ||
) |
Constructor with model and Ipopt problems.
Definition at line 17 of file BonInitHeuristic.cpp.
InitHeuristic::InitHeuristic | ( | const InitHeuristic & | other | ) |
Copy constructor.
Definition at line 50 of file BonInitHeuristic.cpp.
|
virtual |
Destructor.
Definition at line 89 of file BonInitHeuristic.cpp.
|
private |
Default constructor.
|
virtual |
Clone.
Definition at line 66 of file BonInitHeuristic.cpp.
InitHeuristic & InitHeuristic::operator= | ( | const InitHeuristic & | rhs | ) |
Assignment operator.
Definition at line 71 of file BonInitHeuristic.cpp.
|
inlinevirtual |
Definition at line 42 of file BonInitHeuristic.hpp.
|
virtual |
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
objectiveValue Best known solution in input and value of solution found in output newSolution Solution found by heuristic.
Definition at line 95 of file BonInitHeuristic.cpp.
|
private |
objective function value from initial solve
Definition at line 56 of file BonInitHeuristic.hpp.
|
private |
point from initial solve
Definition at line 59 of file BonInitHeuristic.hpp.
|
private |
Size of array sol.
Definition at line 62 of file BonInitHeuristic.hpp.