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

#include <BonNlpHeuristic.hpp>

+ Inheritance diagram for Couenne::NlpSolveHeuristic:
+ Collaboration diagram for Couenne::NlpSolveHeuristic:

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 CbcHeuristicclone () 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...
 
- Public Member Functions inherited from CbcHeuristic
 CbcHeuristic ()
 
 CbcHeuristic (CbcModel &model)
 
 CbcHeuristic (const CbcHeuristic &)
 
virtual ~CbcHeuristic ()
 
CbcHeuristicoperator= (const CbcHeuristic &rhs)
 
virtual void setModel (CbcModel *model)
 
virtual int solution2 (double &, double *, OsiCuts &)
 
virtual void validate ()
 
void setWhen (int value)
 
int when () const
 
void setNumberNodes (int value)
 
int numberNodes () const
 
void setSwitches (int value)
 
int switches () const
 
bool exitNow (double bestObjective) const
 
void setFeasibilityPumpOptions (int value)
 
int feasibilityPumpOptions () const
 
void setModelOnly (CbcModel *model)
 
void setFractionSmall (double value)
 
double fractionSmall () const
 
int numberSolutionsFound () const
 
void incrementNumberSolutionsFound ()
 
int smallBranchAndBound (OsiSolverInterface *solver, int numberNodes, double *newSolution, double &newSolutionValue, double cutoff, std::string name) const
 
virtual void generateCpp (FILE *)
 
void generateCpp (FILE *fp, const char *heuristic)
 
virtual bool canDealWithOdd () const
 
const char * heuristicName () const
 
void setHeuristicName (const char *name)
 
void setSeed (int value)
 
int getSeed () const
 
void setDecayFactor (double value)
 
void setInputSolution (const double *solution, double objValue)
 
void setWhereFrom (int value)
 
int whereFrom () const
 
void setShallowDepth (int value)
 
void setHowOftenShallow (int value)
 
void setMinDistanceToRun (int value)
 
virtual bool shouldHeurRun (int whereFrom)
 
bool shouldHeurRun_randomChoice ()
 
void debugNodes ()
 
void printDistanceToNodes ()
 
int numRuns () const
 
int numCouldRun () const
 
bool isHeuristicInteger (const OsiSolverInterface *solver, int iColumn)
 
OsiSolverInterfacecloneBut (int type)
 

Static Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from CbcHeuristic
CbcModelmodel_
 
int when_
 
int numberNodes_
 
int feasibilityPumpOptions_
 
double fractionSmall_
 
CoinThreadRandom randomNumberGenerator_
 
std::string heuristicName_
 
int howOften_
 
double decayFactor_
 
int switches_
 
int whereFrom_
 
int shallowDepth_
 
int howOftenShallow_
 
int numInvocationsInShallow_
 
int numInvocationsInDeep_
 
int lastRunDeep_
 
int numRuns_
 
int minDistanceToRun_
 
CbcHeuristicNodeList runNodes_
 
int numCouldRun_
 
int numberSolutionsFound_
 
int numberNodesDone_
 
double * inputSolution_
 

Detailed Description

Definition at line 28 of file BonNlpHeuristic.hpp.

Constructor & Destructor Documentation

◆ NlpSolveHeuristic() [1/3]

Couenne::NlpSolveHeuristic::NlpSolveHeuristic ( )

Default constructor.

◆ NlpSolveHeuristic() [2/3]

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

Constructor with model and Ipopt problems.

◆ NlpSolveHeuristic() [3/3]

Couenne::NlpSolveHeuristic::NlpSolveHeuristic ( const NlpSolveHeuristic other)

Copy constructor.

◆ ~NlpSolveHeuristic()

virtual Couenne::NlpSolveHeuristic::~NlpSolveHeuristic ( )
virtual

Destructor.

Member Function Documentation

◆ clone()

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

Clone.

Implements CbcHeuristic.

◆ operator=()

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

Assignment operator.

◆ setNlp()

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

Set the nlp solver.

◆ setCouenneProblem()

void Couenne::NlpSolveHeuristic::setCouenneProblem ( CouenneProblem )

set the couenne problem to use.

◆ resetModel()

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

Does nothing.

Implements CbcHeuristic.

Definition at line 53 of file BonNlpHeuristic.hpp.

◆ solution()

virtual int Couenne::NlpSolveHeuristic::solution ( double &  objectiveValue,
double *  newSolution 
)
virtual

Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.

\argument objectiveValue Best known solution in input and value of solution found in output \argument newSolution Solution found by heuristic.

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

Implements CbcHeuristic.

◆ setMaxNlpInf()

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

set maxNlpInf.

Definition at line 61 of file BonNlpHeuristic.hpp.

◆ setNumberSolvePerLevel()

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.

◆ registerOptions()

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

initialize options


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