Couenne::CouenneIterativeRounding Class Reference

#include <CouenneIterativeRounding.hpp>

List of all members.

Public Member Functions

 CouenneIterativeRounding ()
 Default constructor.
 CouenneIterativeRounding (Bonmin::OsiTMINLPInterface *nlp, OsiSolverInterface *cinlp, CouenneProblem *couenne, Ipopt::SmartPtr< Ipopt::OptionsList > options)
 Constructor with model and Couenne problems.
 CouenneIterativeRounding (const CouenneIterativeRounding &other)
 Copy constructor.
virtual ~CouenneIterativeRounding ()
 Destructor.
virtual CbcHeuristic * clone () const
 Clone.
CouenneIterativeRoundingoperator= (const CouenneIterativeRounding &rhs)
 Assignment operator.
void setNlp (Bonmin::OsiTMINLPInterface *nlp, OsiSolverInterface *cinlp)
 Set the minlp solver.
void setCouenneProblem (CouenneProblem *couenne)
 Set the couenne problem to use.
void resetModel (CbcModel *model)
 Does nothing.
int solution (double &objectiveValue, double *newSolution)
 Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
void setMaxRoundingIter (int value)
 Set maximum number of iterations for each rounding phase.
void setMaxFirPoints (int value)
 Set maximum number of points that we try to round in F-IR.
void setMaxTime (double value)
 Set maximum CPU time for the heuristic at each node.
void setMaxTimeFirstCall (double value)
 Set maximum CPU time for the heuristic at the root node only.
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).
void setBaseLbRhs (int value)
 Set the base value for the rhs of the local branching constraint in the I-IR heuristic.
void setAggressiveness (int value)
 Set aggressiveness of heuristic.

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions >)
 initialize options to be read later

Private Member Functions

bool areEqual (double a, double b)
 Check if two double precision numbers are equal, up to some tolerance.
int feasibilityIR (double &objectiveValue, double *newSolution)
int improvementIR (double &objectiveValue, double *newSolution, const double *startingSolution)
void setMilp ()
 Set the milp solver at the root.
int computeIntAtBound (const double *x)
 Compute number of integer variables at one of their bounds at a given point x.
int computeIntAtBound (const double *x, double &avgBoundSize)
 Compute number of integer variables at one of their bounds at a given point x and average distance between the bounds of variables at one of their bounds.
void writeLB (OsiRowCut &cut, const double *x, char sense, double rhs)
 Write down a local branching constraint, as an OsiRowCut.
int branchToCut (const double *x, OsiSolverInterface *solver, std::vector< int > &previousBranches)
 Branch on a random variable to cut given solution; returns var index.
bool solveMilp (OsiSolverInterface *milp, double maxTime)
 Solve the MILP contained in milp to feasibility, or report failure.

Private Attributes

Bonmin::OsiTMINLPInterface * nlp_
 Pointer to a dynamic nlp solver interface.
OsiSolverInterface * cinlp_
 Pointer to the original NLP solver interface.
OsiClpSolverInterface * milp_
 Pointer to a milp solver interface.
int maxRoundingIter_
 Maximum number of iterations in the main loop.
int maxFirPoints_
 Maximum number of iterations in the outer loop for feasibility.
double maxTime_
 Max CPU time to run the heuristic.
double maxTimeFirstCall_
 Max CPU time to run the heuristic when no other solution is known.
int numInitialRows_
 Number of rows in the original convexification.
int numSol_
 Number of solutions last time the heuristic was called.
int numIntegers_
 Number of integer variables in the original model.
double * colLower_
 Pointer to original column lower and upper bounds of the reformulated problem, i.e.
double * colUpper_
double * colLowerNlp_
 Pointer to column lower and upper bounds of the original problem, i.e.
double * colUpperNlp_
CbcHeuristic ** heuristics_
 Heuristics for the MILP.
int numHeuristics_
double startTime_
 Starting time for the heuristics.
double endTime_
 Maximum allowed time for current run.
double omega_
 Multiplication factor for log barrier parameter in F-IR; see in the paper.
int baseLbRhs_
 Base value for the rhs of the local branching constraint it I-IR.
CouenneProblemcouenne_
 Pointer to a couenne representation of the problem.

Detailed Description

Definition at line 38 of file CouenneIterativeRounding.hpp.


Constructor & Destructor Documentation

Couenne::CouenneIterativeRounding::CouenneIterativeRounding (  ) 

Default constructor.

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

Constructor with model and Couenne problems.

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

Copy constructor.

virtual Couenne::CouenneIterativeRounding::~CouenneIterativeRounding (  )  [virtual]

Destructor.


Member Function Documentation

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

Clone.

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

Assignment operator.

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

Set the minlp solver.

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

Set the couenne problem to use.

Definition at line 64 of file CouenneIterativeRounding.hpp.

References couenne_.

void Couenne::CouenneIterativeRounding::resetModel ( CbcModel *  model  )  [inline]

Does nothing.

Definition at line 69 of file CouenneIterativeRounding.hpp.

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

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.

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

Set maximum number of iterations for each rounding phase.

Definition at line 81 of file CouenneIterativeRounding.hpp.

References maxRoundingIter_.

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

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

Definition at line 86 of file CouenneIterativeRounding.hpp.

References maxFirPoints_.

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

Set maximum CPU time for the heuristic at each node.

Definition at line 91 of file CouenneIterativeRounding.hpp.

References maxTime_.

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

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

Definition at line 96 of file CouenneIterativeRounding.hpp.

References maxTimeFirstCall_.

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 104 of file CouenneIterativeRounding.hpp.

References omega_.

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 111 of file CouenneIterativeRounding.hpp.

References baseLbRhs_.

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

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

initialize options to be read later

bool Couenne::CouenneIterativeRounding::areEqual ( double  a,
double  b 
) [inline, private]

Check if two double precision numbers are equal, up to some tolerance.

Definition at line 183 of file CouenneIterativeRounding.hpp.

References COUENNE_EPS.

int Couenne::CouenneIterativeRounding::feasibilityIR ( double &  objectiveValue,
double *  newSolution 
) [private]
int Couenne::CouenneIterativeRounding::improvementIR ( double &  objectiveValue,
double *  newSolution,
const double *  startingSolution 
) [private]
void Couenne::CouenneIterativeRounding::setMilp (  )  [private]

Set the milp solver at the root.

int Couenne::CouenneIterativeRounding::computeIntAtBound ( const double *  x  )  [private]

Compute number of integer variables at one of their bounds at a given point x.

int Couenne::CouenneIterativeRounding::computeIntAtBound ( const double *  x,
double &  avgBoundSize 
) [private]

Compute number of integer variables at one of their bounds at a given point x and average distance between the bounds of variables at one of their bounds.

void Couenne::CouenneIterativeRounding::writeLB ( OsiRowCut &  cut,
const double *  x,
char  sense,
double  rhs 
) [private]

Write down a local branching constraint, as an OsiRowCut.

int Couenne::CouenneIterativeRounding::branchToCut ( const double *  x,
OsiSolverInterface *  solver,
std::vector< int > &  previousBranches 
) [private]

Branch on a random variable to cut given solution; returns var index.

bool Couenne::CouenneIterativeRounding::solveMilp ( OsiSolverInterface *  milp,
double  maxTime 
) [private]

Solve the MILP contained in milp to feasibility, or report failure.


Member Data Documentation

Bonmin::OsiTMINLPInterface* Couenne::CouenneIterativeRounding::nlp_ [private]

Pointer to a dynamic nlp solver interface.

Definition at line 133 of file CouenneIterativeRounding.hpp.

OsiSolverInterface* Couenne::CouenneIterativeRounding::cinlp_ [private]

Pointer to the original NLP solver interface.

Definition at line 135 of file CouenneIterativeRounding.hpp.

OsiClpSolverInterface* Couenne::CouenneIterativeRounding::milp_ [private]

Pointer to a milp solver interface.

Definition at line 140 of file CouenneIterativeRounding.hpp.

Maximum number of iterations in the main loop.

Definition at line 143 of file CouenneIterativeRounding.hpp.

Referenced by setMaxRoundingIter().

Maximum number of iterations in the outer loop for feasibility.

Definition at line 145 of file CouenneIterativeRounding.hpp.

Referenced by setMaxFirPoints().

Max CPU time to run the heuristic.

Definition at line 147 of file CouenneIterativeRounding.hpp.

Referenced by setMaxTime().

Max CPU time to run the heuristic when no other solution is known.

Definition at line 149 of file CouenneIterativeRounding.hpp.

Referenced by setMaxTimeFirstCall().

Number of rows in the original convexification.

Definition at line 151 of file CouenneIterativeRounding.hpp.

Number of solutions last time the heuristic was called.

Definition at line 153 of file CouenneIterativeRounding.hpp.

Number of integer variables in the original model.

Definition at line 155 of file CouenneIterativeRounding.hpp.

Pointer to original column lower and upper bounds of the reformulated problem, i.e.

the linearization

Definition at line 158 of file CouenneIterativeRounding.hpp.

Definition at line 159 of file CouenneIterativeRounding.hpp.

Pointer to column lower and upper bounds of the original problem, i.e.

the MINLP

Definition at line 162 of file CouenneIterativeRounding.hpp.

Definition at line 163 of file CouenneIterativeRounding.hpp.

Heuristics for the MILP.

Definition at line 166 of file CouenneIterativeRounding.hpp.

Definition at line 167 of file CouenneIterativeRounding.hpp.

Starting time for the heuristics.

Definition at line 170 of file CouenneIterativeRounding.hpp.

Maximum allowed time for current run.

Definition at line 172 of file CouenneIterativeRounding.hpp.

Multiplication factor for log barrier parameter in F-IR; see in the paper.

Definition at line 175 of file CouenneIterativeRounding.hpp.

Referenced by setOmega().

Base value for the rhs of the local branching constraint it I-IR.

Definition at line 177 of file CouenneIterativeRounding.hpp.

Referenced by setBaseLbRhs().

Pointer to a couenne representation of the problem.

Definition at line 180 of file CouenneIterativeRounding.hpp.

Referenced by setCouenneProblem().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 17 Sep 2013 for Couenne by  doxygen 1.6.1