#include <BonInitHeuristic.hpp>
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) |
| 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 24 of file BonInitHeuristic.hpp.
| Bonmin::InitHeuristic::InitHeuristic | ( | double | objValue, | |
| const double * | sol, | |||
| CouenneProblem & | cp | |||
| ) |
Constructor with model and Ipopt problems.
Definition at line 16 of file BonInitHeuristic.cpp.
References CouenneProblem::checkNLP(), CouenneProblem::getAuxs(), CouenneProblem::nOrigVars(), CouenneProblem::nVars(), nVars_, objValue_, and sol_.
| Bonmin::InitHeuristic::InitHeuristic | ( | const InitHeuristic & | other | ) |
| Bonmin::InitHeuristic::~InitHeuristic | ( | ) | [virtual] |
| Bonmin::InitHeuristic::InitHeuristic | ( | ) | [private] |
| CbcHeuristic * Bonmin::InitHeuristic::clone | ( | ) | const [virtual] |
| InitHeuristic & Bonmin::InitHeuristic::operator= | ( | const InitHeuristic & | rhs | ) |
| virtual void Bonmin::InitHeuristic::resetModel | ( | CbcModel * | model | ) | [inline, virtual] |
Definition at line 40 of file BonInitHeuristic.hpp.
| 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.
Definition at line 83 of file BonInitHeuristic.cpp.
double Bonmin::InitHeuristic::objValue_ [private] |
objective function value from initial solve
Definition at line 52 of file BonInitHeuristic.hpp.
Referenced by InitHeuristic(), operator=(), and solution().
double* Bonmin::InitHeuristic::sol_ [private] |
point from initial solve
Definition at line 55 of file BonInitHeuristic.hpp.
Referenced by InitHeuristic(), operator=(), solution(), and ~InitHeuristic().
int Bonmin::InitHeuristic::nVars_ [private] |
Size of array sol.
Definition at line 58 of file BonInitHeuristic.hpp.
Referenced by InitHeuristic(), operator=(), and solution().
1.4.7