Couenne  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Couenne::InitHeuristic Class Reference

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

#include <BonInitHeuristic.hpp>

Inheritance diagram for Couenne::InitHeuristic:

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...
 
InitHeuristicoperator= (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...
 

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

Constructor & Destructor Documentation

Couenne::InitHeuristic::InitHeuristic ( double  objValue,
const double *  sol,
CouenneProblem cp 
)

Constructor with model and Ipopt problems.

Couenne::InitHeuristic::InitHeuristic ( const InitHeuristic other)

Copy constructor.

virtual Couenne::InitHeuristic::~InitHeuristic ( )
virtual

Destructor.

Couenne::InitHeuristic::InitHeuristic ( )
private

Default constructor.

Member Function Documentation

virtual CbcHeuristic* Couenne::InitHeuristic::clone ( ) const
virtual

Clone.

InitHeuristic& Couenne::InitHeuristic::operator= ( const InitHeuristic rhs)

Assignment operator.

virtual void Couenne::InitHeuristic::resetModel ( CbcModel *  model)
inlinevirtual

Definition at line 42 of file BonInitHeuristic.hpp.

virtual int Couenne::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

Member Data Documentation

double Couenne::InitHeuristic::objValue_
private

objective function value from initial solve

Definition at line 56 of file BonInitHeuristic.hpp.

double* Couenne::InitHeuristic::sol_
private

point from initial solve

Definition at line 59 of file BonInitHeuristic.hpp.

int Couenne::InitHeuristic::nVars_
private

Size of array sol.

Definition at line 62 of file BonInitHeuristic.hpp.


The documentation for this class was generated from the following file: