#include <BonInitHeuristic.hpp>
Inheritance diagram for Bonmin::InitHeuristic:
Public Member Functions | |
InitHeuristic (double objValue, const double *sol, CouenneProblem &cp) | |
Constructor with model and Ipopt problems. | |
InitHeuristic (const InitHeuristic &other) | |
Copy constructor. | |
virtual | ~InitHeuristic () |
Destructor. | |
virtual CbcHeuristic * | clone () const |
Clone. | |
InitHeuristic & | operator= (const InitHeuristic &rhs) |
Assignment operator. | |
virtual void | resetModel (CbcModel *model) |
Resets stuff if model changes. | |
virtual int | solution (double &objectiveValue, double *newSolution) |
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise. | |
Private Member Functions | |
InitHeuristic () | |
Default constructor. | |
Private Attributes | |
double | objValue_ |
objective function value from initial solve | |
double * | sol_ |
point from initial solve | |
int | nVars_ |
Size of array sol. |
This is computed before Cbc is started, and in this way we can tell Cbc about this.
Definition at line 23 of file BonInitHeuristic.hpp.
Bonmin::InitHeuristic::InitHeuristic | ( | double | objValue, | |
const double * | sol, | |||
CouenneProblem & | cp | |||
) |
Constructor with model and Ipopt problems.
Bonmin::InitHeuristic::InitHeuristic | ( | const InitHeuristic & | other | ) |
Copy constructor.
virtual Bonmin::InitHeuristic::~InitHeuristic | ( | ) | [virtual] |
Destructor.
Bonmin::InitHeuristic::InitHeuristic | ( | ) | [private] |
Default constructor.
virtual CbcHeuristic* Bonmin::InitHeuristic::clone | ( | ) | const [virtual] |
InitHeuristic& Bonmin::InitHeuristic::operator= | ( | const InitHeuristic & | rhs | ) |
Assignment operator.
virtual void Bonmin::InitHeuristic::resetModel | ( | CbcModel * | model | ) | [inline, virtual] |
Resets stuff if model changes.
Implements CbcHeuristic.
Definition at line 39 of file BonInitHeuristic.hpp.
virtual int Bonmin::InitHeuristic::solution | ( | double & | objectiveValue, | |
double * | newSolution | |||
) | [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.
Implements CbcHeuristic.
double Bonmin::InitHeuristic::objValue_ [private] |
double* Bonmin::InitHeuristic::sol_ [private] |
int Bonmin::InitHeuristic::nVars_ [private] |