Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Couenne::NlpSolveHeuristic Class Reference

#include <BonNlpHeuristic.hpp>

Inheritance diagram for Couenne::NlpSolveHeuristic:
Inheritance graph
[legend]
Collaboration diagram for Couenne::NlpSolveHeuristic:
Collaboration graph
[legend]

Public Member Functions

 NlpSolveHeuristic ()
 Default constructor. More...
 
 NlpSolveHeuristic (CbcModel &mip, Bonmin::OsiTMINLPInterface &nlp, bool cloneNlp=false, CouenneProblem *couenne=NULL)
 Constructor with model and Ipopt problems. More...
 
 NlpSolveHeuristic (const NlpSolveHeuristic &other)
 Copy constructor. More...
 
virtual ~NlpSolveHeuristic ()
 Destructor. More...
 
virtual CbcHeuristic * clone () const
 Clone. More...
 
NlpSolveHeuristicoperator= (const NlpSolveHeuristic &rhs)
 Assignment operator. More...
 
void setNlp (Bonmin::OsiTMINLPInterface &nlp, bool cloneNlp=true)
 Set the nlp solver. More...
 
void setCouenneProblem (CouenneProblem *)
 set the couenne problem to use. More...
 
virtual void resetModel (CbcModel *model)
 Does nothing. More...
 
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...
 
void setMaxNlpInf (double value)
 set maxNlpInf. More...
 
void setNumberSolvePerLevel (int value)
 set number of nlp's solved for each given level of the tree More...
 

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions >)
 initialize options More...
 

Private Attributes

Bonmin::OsiTMINLPInterfacenlp_
 Pointer to an nlp solver interface. More...
 
bool hasCloned_
 is nlp_ cloned or just a pointer? More...
 
double maxNlpInf_
 maximum nlp infeasibility under which try to solve problem with Ipopt. More...
 
int numberSolvePerLevel_
 Number of nlp's solved for each given level of the tree. More...
 
CouenneProblemcouenne_
 Pointer to a couenne representation of the problem. More...
 

Detailed Description

Definition at line 28 of file BonNlpHeuristic.hpp.

Constructor & Destructor Documentation

NlpSolveHeuristic::NlpSolveHeuristic ( )

Default constructor.

Definition at line 28 of file BonNlpHeuristic.cpp.

NlpSolveHeuristic::NlpSolveHeuristic ( CbcModel &  mip,
Bonmin::OsiTMINLPInterface nlp,
bool  cloneNlp = false,
CouenneProblem couenne = NULL 
)

Constructor with model and Ipopt problems.

Definition at line 38 of file BonNlpHeuristic.cpp.

NlpSolveHeuristic::NlpSolveHeuristic ( const NlpSolveHeuristic other)

Copy constructor.

Definition at line 47 of file BonNlpHeuristic.cpp.

NlpSolveHeuristic::~NlpSolveHeuristic ( )
virtual

Destructor.

Definition at line 83 of file BonNlpHeuristic.cpp.

Member Function Documentation

CbcHeuristic * NlpSolveHeuristic::clone ( ) const
virtual

Clone.

Definition at line 58 of file BonNlpHeuristic.cpp.

NlpSolveHeuristic & NlpSolveHeuristic::operator= ( const NlpSolveHeuristic rhs)

Assignment operator.

Definition at line 63 of file BonNlpHeuristic.cpp.

void NlpSolveHeuristic::setNlp ( Bonmin::OsiTMINLPInterface nlp,
bool  cloneNlp = true 
)

Set the nlp solver.

Definition at line 90 of file BonNlpHeuristic.cpp.

void NlpSolveHeuristic::setCouenneProblem ( CouenneProblem couenne)

set the couenne problem to use.

Definition at line 101 of file BonNlpHeuristic.cpp.

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

Does nothing.

Definition at line 53 of file BonNlpHeuristic.hpp.

int NlpSolveHeuristic::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

Definition at line 106 of file BonNlpHeuristic.cpp.

void Couenne::NlpSolveHeuristic::setMaxNlpInf ( double  value)
inline

set maxNlpInf.

Definition at line 61 of file BonNlpHeuristic.hpp.

void Couenne::NlpSolveHeuristic::setNumberSolvePerLevel ( int  value)
inline

set number of nlp's solved for each given level of the tree

Definition at line 64 of file BonNlpHeuristic.hpp.

void NlpSolveHeuristic::registerOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions)
static

initialize options

Definition at line 432 of file BonNlpHeuristic.cpp.

Member Data Documentation

Bonmin::OsiTMINLPInterface* Couenne::NlpSolveHeuristic::nlp_
private

Pointer to an nlp solver interface.

Definition at line 72 of file BonNlpHeuristic.hpp.

bool Couenne::NlpSolveHeuristic::hasCloned_
private

is nlp_ cloned or just a pointer?

Definition at line 74 of file BonNlpHeuristic.hpp.

double Couenne::NlpSolveHeuristic::maxNlpInf_
private

maximum nlp infeasibility under which try to solve problem with Ipopt.

Definition at line 76 of file BonNlpHeuristic.hpp.

int Couenne::NlpSolveHeuristic::numberSolvePerLevel_
private

Number of nlp's solved for each given level of the tree.

Definition at line 78 of file BonNlpHeuristic.hpp.

CouenneProblem* Couenne::NlpSolveHeuristic::couenne_
private

Pointer to a couenne representation of the problem.

Definition at line 80 of file BonNlpHeuristic.hpp.


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