Bonmin::NlpSolveHeuristic Class Reference

#include <BonNlpHeuristic.hpp>

Collaboration diagram for Bonmin::NlpSolveHeuristic:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NlpSolveHeuristic ()
 Default constructor.
 NlpSolveHeuristic (CbcModel &mip, OsiSolverInterface &nlp, bool cloneNlp=false, CouenneProblem *couenne=NULL)
 Constructor with model and Ipopt problems.
 NlpSolveHeuristic (const NlpSolveHeuristic &other)
 Copy constructor.
virtual ~NlpSolveHeuristic ()
 Destructor.
virtual CbcHeuristic * clone () const
 Clone.
NlpSolveHeuristicoperator= (const NlpSolveHeuristic &rhs)
 Assignment operator.
void setNlp (OsiSolverInterface &nlp, bool cloneNlp=true)
 Set the nlp solver.
void setCouenneProblem (CouenneProblem *)
 set the couenne problem to use.
virtual void resetModel (CbcModel *model)
 Does nothing.
virtual int solution (double &objectiveValue, double *newSolution)
 Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
void setMaxNlpInf (double value)
 set maxNlpInf.
void setNumberSolvePerLevel (int value)
 set number of nlp's solved for each given level of the tree

Private Attributes

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

Detailed Description

Definition at line 22 of file BonNlpHeuristic.hpp.


Constructor & Destructor Documentation

Bonmin::NlpSolveHeuristic::NlpSolveHeuristic (  ) 

Default constructor.

Definition at line 24 of file BonNlpHeuristic.cpp.

Referenced by clone().

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

Constructor with model and Ipopt problems.

Definition at line 34 of file BonNlpHeuristic.cpp.

References nlp_.

Bonmin::NlpSolveHeuristic::NlpSolveHeuristic ( const NlpSolveHeuristic other  ) 

Copy constructor.

Definition at line 43 of file BonNlpHeuristic.cpp.

References hasCloned_, and nlp_.

Bonmin::NlpSolveHeuristic::~NlpSolveHeuristic (  )  [virtual]

Destructor.

Definition at line 79 of file BonNlpHeuristic.cpp.

References hasCloned_, and nlp_.


Member Function Documentation

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

Clone.

Definition at line 54 of file BonNlpHeuristic.cpp.

References NlpSolveHeuristic().

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

Assignment operator.

Definition at line 59 of file BonNlpHeuristic.cpp.

References couenne_, hasCloned_, maxNlpInf_, nlp_, and numberSolvePerLevel_.

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

Set the nlp solver.

Definition at line 86 of file BonNlpHeuristic.cpp.

References hasCloned_, and nlp_.

Referenced by Bonmin::CouenneSetup::InitializeCouenne().

void Bonmin::NlpSolveHeuristic::setCouenneProblem ( CouenneProblem  ) 

set the couenne problem to use.

Definition at line 97 of file BonNlpHeuristic.cpp.

References couenne_.

Referenced by Bonmin::CouenneSetup::InitializeCouenne().

virtual void Bonmin::NlpSolveHeuristic::resetModel ( CbcModel *  model  )  [inline, virtual]

Does nothing.

Definition at line 46 of file BonNlpHeuristic.hpp.

int Bonmin::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 102 of file BonNlpHeuristic.cpp.

References couenne_, COUENNE_EPS, COUENNE_INFINITY, Bonmin::AuxInfo::infeasibleNode(), info, maxNlpInf_, nlp_, numberSolvePerLevel_, Bonmin::AuxInfo::setHasNlpSolution(), and Bonmin::AuxInfo::setNlpSolution().

void Bonmin::NlpSolveHeuristic::setMaxNlpInf ( double  value  )  [inline]

set maxNlpInf.

Definition at line 54 of file BonNlpHeuristic.hpp.

References maxNlpInf_.

Referenced by Bonmin::CouenneSetup::InitializeCouenne().

void Bonmin::NlpSolveHeuristic::setNumberSolvePerLevel ( int  value  )  [inline]

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

Definition at line 57 of file BonNlpHeuristic.hpp.

References numberSolvePerLevel_.

Referenced by Bonmin::CouenneSetup::InitializeCouenne().


Member Data Documentation

OsiSolverInterface* Bonmin::NlpSolveHeuristic::nlp_ [private]

Pointer to an nlp solver interface.

Definition at line 61 of file BonNlpHeuristic.hpp.

Referenced by NlpSolveHeuristic(), operator=(), setNlp(), solution(), and ~NlpSolveHeuristic().

bool Bonmin::NlpSolveHeuristic::hasCloned_ [private]

is nlp_ cloned or just a pointer?

Definition at line 63 of file BonNlpHeuristic.hpp.

Referenced by NlpSolveHeuristic(), operator=(), setNlp(), and ~NlpSolveHeuristic().

double Bonmin::NlpSolveHeuristic::maxNlpInf_ [private]

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

Definition at line 65 of file BonNlpHeuristic.hpp.

Referenced by operator=(), setMaxNlpInf(), and solution().

int Bonmin::NlpSolveHeuristic::numberSolvePerLevel_ [private]

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

Definition at line 67 of file BonNlpHeuristic.hpp.

Referenced by operator=(), setNumberSolvePerLevel(), and solution().

CouenneProblem* Bonmin::NlpSolveHeuristic::couenne_ [private]

Pointer to a couenne representation of the problem.

Definition at line 69 of file BonNlpHeuristic.hpp.

Referenced by operator=(), setCouenneProblem(), and solution().


The documentation for this class was generated from the following files:
Generated on Mon May 3 03:14:03 2010 by  doxygen 1.4.7