Couenne::CouenneChooseStrong Class Reference

#include <CouenneChooseStrong.hpp>

Inheritance diagram for Couenne::CouenneChooseStrong:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CouenneChooseStrong (Bonmin::BabSetupBase &b, CouenneProblem *problem, JnlstPtr jnlst)
 Constructor from solver (so we can set up arrays etc).
 CouenneChooseStrong (const CouenneChooseStrong &)
 Copy constructor.
CouenneChooseStrongoperator= (const CouenneChooseStrong &rhs)
 Assignment operator.
virtual OsiChooseVariable * clone () const
 Clone.
virtual ~CouenneChooseStrong ()
 Destructor.
virtual int setupList (OsiBranchingInformation *info, bool initialize)
 Sets up strong list and clears all if initialize is true.
int gutsOfSetupList (OsiBranchingInformation *info, bool initialize)
virtual int doStrongBranching (OsiSolverInterface *OsiSolver, OsiBranchingInformation *info, int numberToDo, int returnCriterion)
 This is a utility function which does strong branching on a list of objects and stores the results in OsiHotInfo.objects.
virtual bool feasibleSolution (const OsiBranchingInformation *info, const double *solution, int numberObjects, const OsiObject **objects)
 Returns true if solution looks feasible against given objects.
virtual int chooseVariable (OsiSolverInterface *solver, OsiBranchingInformation *info, bool fixVariables)
 choose object to branch based on earlier setup

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Add list of options to be read from file.

Protected Member Functions

int simulateBranch (OsiObject *Object, OsiBranchingInformation *info, OsiBranchingObject *branch, OsiSolverInterface *solver, Bonmin::HotInfo *result, int direction)
 does one side of the branching

Protected Attributes

CouenneProblemproblem_
 Pointer to the associated MINLP problem.
bool pseudoUpdateLP_
 should we update the pseudocost multiplier with the distance between the LP point and the solution of the resulting branches' LPs? If so, this only happens in strong branching
bool estimateProduct_
 Normally, a convex combination of the min/max lower bounds' estimates is taken to select a branching variable, as in the original definition of strong branching.
JnlstPtr jnlst_
 pointer to journalist for detailed information
double branchtime_
 total time spent in strong branching

Private Member Functions

 CouenneChooseStrong ()
 Default Constructor, forbidden for some reason.
void printObjViol (OsiBranchingInformation *info)
int goodCandidate (OsiSolverInterface *solver, OsiBranchingInformation *info, OsiObject **object, const int iObject, const double prec)
bool saveBestCand (OsiObject **object, const int iObject, const double value, const double upEstimate, const double downEstimate, double &bestVal1, double &bestVal2, int &bestIndex, int &bestWay)
 Save best candidate.

Detailed Description

Definition at line 23 of file CouenneChooseStrong.hpp.


Constructor & Destructor Documentation

CouenneChooseStrong::CouenneChooseStrong ( Bonmin::BabSetupBase b,
CouenneProblem problem,
JnlstPtr  jnlst 
)

Constructor from solver (so we can set up arrays etc).

Definition at line 38 of file CouenneChooseStrong.cpp.

References estimateProduct_, Bonmin::BabSetupBase::options(), pseudoUpdateLP_, and s.

CouenneChooseStrong::CouenneChooseStrong ( const CouenneChooseStrong  ) 

Copy constructor.

Definition at line 62 of file CouenneChooseStrong.cpp.

CouenneChooseStrong::~CouenneChooseStrong (  )  [virtual]

Destructor.

Definition at line 72 of file CouenneChooseStrong.cpp.

References branchtime_, e, Couenne::J_BRANCHING(), and jnlst_.

Couenne::CouenneChooseStrong::CouenneChooseStrong (  )  [private]

Default Constructor, forbidden for some reason.

Referenced by clone().


Member Function Documentation

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

Assignment operator.

Definition at line 82 of file CouenneChooseStrong.cpp.

References branchtime_, estimateProduct_, jnlst_, Bonmin::BonChooseVariable::operator=(), problem_, and pseudoUpdateLP_.

OsiChooseVariable * CouenneChooseStrong::clone (  )  const [virtual]

Clone.

Reimplemented from Bonmin::BonChooseVariable.

Definition at line 77 of file CouenneChooseStrong.cpp.

References CouenneChooseStrong().

Referenced by simulateBranch().

int CouenneChooseStrong::setupList ( OsiBranchingInformation *  info,
bool  initialize 
) [virtual]

Sets up strong list and clears all if initialize is true.

Returns number of infeasibilities.

Reimplemented from Bonmin::BonChooseVariable.

Definition at line 647 of file CouenneChooseStrong.cpp.

References Couenne::CouenneProblem::checkNLP(), Couenne::CouenneProblem::checkNLP2(), Couenne::CouenneProblem::doPrint_, Couenne::CouenneProblem::getFeasTol(), Couenne::CouenneProblem::getRecordBestSol(), gutsOfSetupList(), Couenne::J_BRANCHING(), jnlst_, Bonmin::BonChooseVariable::numberStrongRoot_, Couenne::CouenneProblem::nVars(), printObjViol(), problem_, and Couenne::CouenneRecordBestSol::update().

int CouenneChooseStrong::gutsOfSetupList ( OsiBranchingInformation *  info,
bool  initialize 
)

Definition at line 790 of file CouenneChooseStrong.cpp.

References Bonmin::BonChooseVariable::bb_log_level_, Bonmin::BonChooseVariable::CANDIDATE_LIST, Bonmin::BonChooseVariable::CANDIDATE_LIST2, Bonmin::BonChooseVariable::CANDIDATE_LIST3, Bonmin::BonChooseVariable::CNAME, Bonmin::BonChooseVariable::computeMultipliers(), Bonmin::BonChooseVariable::computeUsefulness(), COUENNE_EPS, Couenne::CouenneProblem::doPrint_, e, Couenne::CouenneProblem::getLastPrioSort(), Bonmin::BonChooseVariable::isRootNode(), Bonmin::BonChooseVariable::maxminCrit(), Bonmin::BonChooseVariable::message(), Bonmin::BonChooseVariable::number_not_trusted_, Bonmin::BonChooseVariable::numberBeforeTrustedList_, Bonmin::BonChooseVariable::numberStrongRoot_, OLD_USEFULLNESS, problem_, Bonmin::BonChooseVariable::pseudoCosts_, Couenne::CouenneProblem::setLastPrioSort(), and Bonmin::BonChooseVariable::setup_pseudo_frac_.

Referenced by setupList().

int CouenneChooseStrong::doStrongBranching ( OsiSolverInterface *  OsiSolver,
OsiBranchingInformation *  info,
int  numberToDo,
int  returnCriterion 
) [virtual]

This is a utility function which does strong branching on a list of objects and stores the results in OsiHotInfo.objects.

On entry the object sequence is stored in the OsiHotInfo object and maybe more. It returns - -1 - one branch was infeasible both ways 0 - all inspected - nothing can be fixed 1 - all inspected - some can be fixed (returnCriterion==0) 2 - may be returning early - one can be fixed (last one done) (returnCriterion==1) 3 - returning because max time

Reimplemented from Bonmin::BonChooseVariable.

Definition at line 69 of file doStrongBranching.cpp.

References branchtime_, Couenne::t_chg_bounds::CHANGED, COUENNE_EPS, Couenne::CouenneProblem::doPrint_, Couenne::exprVar::Index(), Couenne::J_BRANCHING(), jnlst_, Couenne::CouenneProblem::Lb(), problem_, pseudoUpdateLP_, Couenne::CouenneObject::Reference(), Bonmin::BonChooseVariable::results_, simulateBranch(), and Couenne::CouenneProblem::Ub().

Referenced by chooseVariable().

bool CouenneChooseStrong::feasibleSolution ( const OsiBranchingInformation *  info,
const double *  solution,
int  numberObjects,
const OsiObject **  objects 
) [virtual]

Returns true if solution looks feasible against given objects.

Definition at line 1404 of file CouenneChooseStrong.cpp.

References Couenne::CouenneProblem::checkNLP2(), Couenne::CouenneProblem::getFeasTol(), and problem_.

int CouenneChooseStrong::chooseVariable ( OsiSolverInterface *  solver,
OsiBranchingInformation *  info,
bool  fixVariables 
) [virtual]

choose object to branch based on earlier setup

Note: had to copy code from BonChooseVariable::chooseVariable() in order to test product thing

Reimplemented from Bonmin::BonChooseVariable.

Definition at line 198 of file CouenneChooseStrong.cpp.

References Bonmin::BonChooseVariable::bb_log_level_, Bonmin::BonChooseVariable::BRANCH_VAR, Bonmin::BonChooseVariable::CHOSEN_VAR, COUENNE_INFINITY, Couenne::Couenne_large_bound, Couenne::CouenneProblem::doPrint_, doStrongBranching(), e, estimateProduct_, estProdEps, Couenne::CouenneProblem::getFeasTol(), goodCandidate(), Couenne::exprVar::Index(), Bonmin::BonChooseVariable::isRootNode(), Couenne::CouenneProblem::Lb(), Bonmin::BonChooseVariable::maxminCrit(), Bonmin::BonChooseVariable::message(), Bonmin::BonChooseVariable::minNumberStrongBranch_, Bonmin::BonChooseVariable::number_not_trusted_, Bonmin::BonChooseVariable::numberStrongRoot_, Bonmin::BonChooseVariable::only_pseudo_when_trusted_, problem_, Bonmin::BonChooseVariable::pseudoCosts_, Couenne::CouenneObject::Reference(), Bonmin::BonChooseVariable::results_, saveBestCand(), Bonmin::BonChooseVariable::SB_HEADER, Bonmin::BonChooseVariable::SB_RES, and Couenne::CouenneProblem::Ub().

void CouenneChooseStrong::registerOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [static]

Add list of options to be read from file.

Definition at line 1362 of file CouenneChooseStrong.cpp.

Referenced by Couenne::CouenneSetup::registerAllOptions().

void CouenneChooseStrong::printObjViol ( OsiBranchingInformation *  info  )  [private]

Definition at line 1419 of file CouenneChooseStrong.cpp.

Referenced by setupList().

int CouenneChooseStrong::goodCandidate ( OsiSolverInterface *  solver,
OsiBranchingInformation *  info,
OsiObject **  object,
const int  iObject,
const double  prec 
) [private]

Definition at line 96 of file CouenneChooseStrong.cpp.

References Couenne::exprVar::Index(), Couenne::exprVar::isInteger(), and Couenne::CouenneObject::Reference().

Referenced by chooseVariable().

bool CouenneChooseStrong::saveBestCand ( OsiObject **  object,
const int  iObject,
const double  value,
const double  upEstimate,
const double  downEstimate,
double &  bestVal1,
double &  bestVal2,
int &  bestIndex,
int &  bestWay 
) [private]

Save best candidate.

Definition at line 162 of file CouenneChooseStrong.cpp.

Referenced by chooseVariable().

int CouenneChooseStrong::simulateBranch ( OsiObject *  Object,
OsiBranchingInformation *  info,
OsiBranchingObject *  branch,
OsiSolverInterface *  solver,
Bonmin::HotInfo result,
int  direction 
) [protected]

does one side of the branching

Definition at line 415 of file doStrongBranching.cpp.

References BranchingFBBT(), clone(), COUENNE_EPS, COUENNE_INFINITY, distance(), problem_, pseudoUpdateLP_, and Bonmin::BonChooseVariable::updateInformation().

Referenced by doStrongBranching().


Member Data Documentation

CouenneProblem* Couenne::CouenneChooseStrong::problem_ [protected]

Pointer to the associated MINLP problem.

Definition at line 119 of file CouenneChooseStrong.hpp.

Referenced by chooseVariable(), doStrongBranching(), feasibleSolution(), gutsOfSetupList(), operator=(), setupList(), and simulateBranch().

bool Couenne::CouenneChooseStrong::pseudoUpdateLP_ [protected]

should we update the pseudocost multiplier with the distance between the LP point and the solution of the resulting branches' LPs? If so, this only happens in strong branching

Definition at line 124 of file CouenneChooseStrong.hpp.

Referenced by CouenneChooseStrong(), doStrongBranching(), operator=(), and simulateBranch().

bool Couenne::CouenneChooseStrong::estimateProduct_ [protected]

Normally, a convex combination of the min/max lower bounds' estimates is taken to select a branching variable, as in the original definition of strong branching.

If this option is set to true, their product is taken instead:

(1e-6+min) * max

where the 1e-6 is used to ensure that even those with one subproblem with no improvement are compared.

Definition at line 135 of file CouenneChooseStrong.hpp.

Referenced by chooseVariable(), CouenneChooseStrong(), and operator=().

JnlstPtr Couenne::CouenneChooseStrong::jnlst_ [protected]

pointer to journalist for detailed information

Reimplemented from Bonmin::BonChooseVariable.

Definition at line 138 of file CouenneChooseStrong.hpp.

Referenced by doStrongBranching(), operator=(), setupList(), and ~CouenneChooseStrong().

double Couenne::CouenneChooseStrong::branchtime_ [protected]

total time spent in strong branching

Definition at line 141 of file CouenneChooseStrong.hpp.

Referenced by doStrongBranching(), operator=(), and ~CouenneChooseStrong().


The documentation for this class was generated from the following files:
Generated on Thu Sep 22 03:14:45 2011 by  doxygen 1.4.7