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

An iterative rounding heuristic, tailored for nonconvex MINLPs. More...

#include <CouenneIterativeRounding.hpp>

+ Inheritance diagram for Couenne::CouenneIterativeRounding:
+ Collaboration diagram for Couenne::CouenneIterativeRounding:

Public Member Functions

 CouenneIterativeRounding ()
 Default constructor. More...
 
 CouenneIterativeRounding (Bonmin::OsiTMINLPInterface *nlp, OsiSolverInterface *cinlp, CouenneProblem *couenne, Ipopt::SmartPtr< Ipopt::OptionsList > options)
 Constructor with model and Couenne problems. More...
 
 CouenneIterativeRounding (const CouenneIterativeRounding &other)
 Copy constructor. More...
 
virtual ~CouenneIterativeRounding ()
 Destructor. More...
 
virtual CbcHeuristicclone () const
 Clone. More...
 
CouenneIterativeRoundingoperator= (const CouenneIterativeRounding &rhs)
 Assignment operator. More...
 
void setNlp (Bonmin::OsiTMINLPInterface *nlp, OsiSolverInterface *cinlp)
 Set the minlp solver. More...
 
void setCouenneProblem (CouenneProblem *couenne)
 Set the couenne problem to use. More...
 
void resetModel (CbcModel *model)
 Does nothing. More...
 
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 setMaxRoundingIter (int value)
 Set maximum number of iterations for each rounding phase. More...
 
void setMaxFirPoints (int value)
 Set maximum number of points that we try to round in F-IR. More...
 
void setMaxTime (double value)
 Set maximum CPU time for the heuristic at each node. More...
 
void setMaxTimeFirstCall (double value)
 Set maximum CPU time for the heuristic at the root node only. More...
 
void setOmega (double value)
 Set the value for omega, the multiplicative factor for the minimum log-barrier parameter mu used by F-IR whenever we need to generate a new NLP feasible point (in the interior of the feasible region) More...
 
void setBaseLbRhs (int value)
 Set the base value for the rhs of the local branching constraint in the I-IR heuristic. More...
 
void setAggressiveness (int value)
 Set aggressiveness of heuristic. More...
 
- Public Member Functions inherited from CbcHeuristic
 CbcHeuristic ()
 
 CbcHeuristic (CbcModel &model)
 
 CbcHeuristic (const CbcHeuristic &)
 
virtual ~CbcHeuristic ()
 
virtual CbcHeuristicclone () const=0
 
CbcHeuristicoperator= (const CbcHeuristic &rhs)
 
virtual void setModel (CbcModel *model)
 
virtual void resetModel (CbcModel *model)=0
 
virtual int solution (double &objectiveValue, double *newSolution)=0
 
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 to be read later 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

An iterative rounding heuristic, tailored for nonconvex MINLPs.

It solves a sequence of MILPs and NLPs for a given number of iterations, or until a better solution is found.

Definition at line 36 of file CouenneIterativeRounding.hpp.

Constructor & Destructor Documentation

◆ CouenneIterativeRounding() [1/3]

Couenne::CouenneIterativeRounding::CouenneIterativeRounding ( )

Default constructor.

◆ CouenneIterativeRounding() [2/3]

Couenne::CouenneIterativeRounding::CouenneIterativeRounding ( Bonmin::OsiTMINLPInterface nlp,
OsiSolverInterface cinlp,
CouenneProblem couenne,
Ipopt::SmartPtr< Ipopt::OptionsList options 
)

Constructor with model and Couenne problems.

◆ CouenneIterativeRounding() [3/3]

Couenne::CouenneIterativeRounding::CouenneIterativeRounding ( const CouenneIterativeRounding other)

Copy constructor.

◆ ~CouenneIterativeRounding()

virtual Couenne::CouenneIterativeRounding::~CouenneIterativeRounding ( )
virtual

Destructor.

Member Function Documentation

◆ clone()

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

Clone.

Implements CbcHeuristic.

◆ operator=()

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

Assignment operator.

◆ setNlp()

void Couenne::CouenneIterativeRounding::setNlp ( Bonmin::OsiTMINLPInterface nlp,
OsiSolverInterface cinlp 
)

Set the minlp solver.

◆ setCouenneProblem()

void Couenne::CouenneIterativeRounding::setCouenneProblem ( CouenneProblem couenne)
inline

Set the couenne problem to use.

Definition at line 62 of file CouenneIterativeRounding.hpp.

◆ resetModel()

void Couenne::CouenneIterativeRounding::resetModel ( CbcModel model)
inlinevirtual

Does nothing.

Implements CbcHeuristic.

Definition at line 67 of file CouenneIterativeRounding.hpp.

◆ solution()

int Couenne::CouenneIterativeRounding::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.

Implements CbcHeuristic.

◆ setMaxRoundingIter()

void Couenne::CouenneIterativeRounding::setMaxRoundingIter ( int  value)
inline

Set maximum number of iterations for each rounding phase.

Definition at line 79 of file CouenneIterativeRounding.hpp.

◆ setMaxFirPoints()

void Couenne::CouenneIterativeRounding::setMaxFirPoints ( int  value)
inline

Set maximum number of points that we try to round in F-IR.

Definition at line 84 of file CouenneIterativeRounding.hpp.

◆ setMaxTime()

void Couenne::CouenneIterativeRounding::setMaxTime ( double  value)
inline

Set maximum CPU time for the heuristic at each node.

Definition at line 89 of file CouenneIterativeRounding.hpp.

◆ setMaxTimeFirstCall()

void Couenne::CouenneIterativeRounding::setMaxTimeFirstCall ( double  value)
inline

Set maximum CPU time for the heuristic at the root node only.

Definition at line 94 of file CouenneIterativeRounding.hpp.

◆ setOmega()

void Couenne::CouenneIterativeRounding::setOmega ( double  value)
inline

Set the value for omega, the multiplicative factor for the minimum log-barrier parameter mu used by F-IR whenever we need to generate a new NLP feasible point (in the interior of the feasible region)

Definition at line 102 of file CouenneIterativeRounding.hpp.

◆ setBaseLbRhs()

void Couenne::CouenneIterativeRounding::setBaseLbRhs ( int  value)
inline

Set the base value for the rhs of the local branching constraint in the I-IR heuristic.

The actual rhs is then computed depending on current variable bounds

Definition at line 109 of file CouenneIterativeRounding.hpp.

◆ setAggressiveness()

void Couenne::CouenneIterativeRounding::setAggressiveness ( int  value)

Set aggressiveness of heuristic.

Three levels, that sets various parameters accordingly.

The levels are: 0: maxRoundingIter = 5, maxTimeFirstCall = 300, maxFirPoints = 5, maxTime = 60 1: maxRoundingIter = 10, maxTimeFirstCall = 300, maxFirPoints = 5, maxTime = 120 2: maxRoundingIter = 20, maxTimeFirstCall = 1000, maxFirPoints = 5, maxTime = 300

◆ registerOptions()

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

initialize options to be read later


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