Bonmin::InitHeuristic Class Reference

A heuristic that stores the initial solution of the NLP. More...

#include <BonInitHeuristic.hpp>

Inheritance diagram for Bonmin::InitHeuristic:

Inheritance graph
[legend]
Collaboration diagram for Bonmin::InitHeuristic:

Collaboration graph
[legend]
List of all members.

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 CbcHeuristicclone () const
 Clone.
InitHeuristicoperator= (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.

Detailed Description

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 23 of file BonInitHeuristic.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

virtual CbcHeuristic* Bonmin::InitHeuristic::clone (  )  const [virtual]

Clone.

Implements CbcHeuristic.

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.

Todo:
Find a quicker way to get to Couenne objects, store them or something

Implements CbcHeuristic.


Member Data Documentation

double Bonmin::InitHeuristic::objValue_ [private]

objective function value from initial solve

Definition at line 51 of file BonInitHeuristic.hpp.

double* Bonmin::InitHeuristic::sol_ [private]

point from initial solve

Definition at line 54 of file BonInitHeuristic.hpp.

int Bonmin::InitHeuristic::nVars_ [private]

Size of array sol.

Definition at line 57 of file BonInitHeuristic.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Jun 26 03:19:44 2008 for Bonmin by  doxygen 1.4.7