Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Couenne::CouenneChooseStrong Class Reference

#include <CouenneChooseStrong.hpp>

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

Public Member Functions

 CouenneChooseStrong (Bonmin::BabSetupBase &b, CouenneProblem *problem, JnlstPtr jnlst)
 Constructor from solver (so we can set up arrays etc) More...
 
 CouenneChooseStrong (const CouenneChooseStrong &)
 Copy constructor. More...
 
CouenneChooseStrongoperator= (const CouenneChooseStrong &rhs)
 Assignment operator. More...
 
virtual OsiChooseVariable * clone () const
 Clone. More...
 
virtual ~CouenneChooseStrong ()
 Destructor. More...
 
virtual int setupList (OsiBranchingInformation *info, bool initialize)
 Sets up strong list and clears all if initialize is true. More...
 
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. More...
 
virtual bool feasibleSolution (const OsiBranchingInformation *info, const double *solution, int numberObjects, const OsiObject **objects)
 Returns true if solution looks feasible against given objects. More...
 
virtual int chooseVariable (OsiSolverInterface *solver, OsiBranchingInformation *info, bool fixVariables)
 choose object to branch based on earlier setup More...
 
- Public Member Functions inherited from Bonmin::BonChooseVariable
 BonChooseVariable (BabSetupBase &b, const OsiSolverInterface *solver)
 Constructor from solver (so we can set up arrays etc) More...
 
 BonChooseVariable (const BonChooseVariable &)
 Copy constructor. More...
 
BonChooseVariableoperator= (const BonChooseVariable &rhs)
 Assignment operator. More...
 
virtual ~BonChooseVariable ()
 Destructor. More...
 
double maxminCrit (const OsiBranchingInformation *info) const
 Helper functions for setupList and chooseVariable. More...
 
void computeMultipliers (double &upMult, double &downMult) const
 
double computeUsefulness (const double MAXMIN_CRITERION, const double upMult, const double dowMult, const double value, const OsiObject *object, int i, double &value2) const
 
virtual void updateInformation (const OsiBranchingInformation *info, int branch, OsiHotInfo *hotInfo)
 This is a utility function which does strong branching on a list of objects and stores the results in OsiHotInfo.objects. More...
 
virtual void updateInformation (int whichObject, int branch, double changeInObjective, double changeInValue, int status)
 Given a branch fill in useful information e.g. estimates. More...
 
void setCbcModel (CbcModel *cbc_model)
 Method for setting CbcModel, which is used to get statusOfSearch. More...
 
void setOnlyPseudoWhenTrusted (bool only_pseudo_when_trusted)
 
const OsiPseudoCosts & pseudoCosts () const
 Access to pseudo costs storage. More...
 
OsiPseudoCosts & pseudoCosts ()
 Access to pseudo costs storage. More...
 
void passInMessageHandler (CoinMessageHandler *handler)
 
CoinMessageHandler & message (Messages_Types type) const
 

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Add list of options to be read from file. More...
 
- Static Public Member Functions inherited from Bonmin::BonChooseVariable
static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 

Protected Member Functions

int simulateBranch (OsiObject *Object, OsiBranchingInformation *info, OsiBranchingObject *branch, OsiSolverInterface *solver, Bonmin::HotInfo *result, int direction)
 does one side of the branching More...
 
- Protected Member Functions inherited from Bonmin::BonChooseVariable
int determineStatus (OsiSolverInterface *solver) const
 Determine status of strong branching solution. More...
 
bool isRootNode (const OsiBranchingInformation *info) const
 detecting if this is root node More...
 

Protected Attributes

CouenneProblemproblem_
 Pointer to the associated MINLP problem. More...
 
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 More...
 
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. More...
 
JnlstPtr jnlst_
 pointer to journalist for detailed information More...
 
double branchtime_
 total time spent in strong branching More...
 
- Protected Attributes inherited from Bonmin::BonChooseVariable
Ipopt::SmartPtr
< Ipopt::Journalist > 
jnlst_
 Holding on the a pointer to the journalist. More...
 
int bb_log_level_
 verbosity level More...
 
vector< HotInforesults_
 Stores strong branching results. More...
 
CbcModel * cbc_model_
 CbcModel, used to get status of search. More...
 
bool only_pseudo_when_trusted_
 Flag indicating whether we don't want to mix strong branching and pseudo costs during the decision which variable to branch on. More...
 
int number_not_trusted_
 Number of variables put into the list because there were not trusted. More...
 
CoinMessageHandler * handler_
 Message handler. More...
 
Messages messages_
 Messages. More...
 
double maxmin_crit_no_sol_
 maxmin weight in branching decision when no solution has been found yet More...
 
double maxmin_crit_have_sol_
 maxmin weight in branching decision when no solution has been found yet More...
 
double setup_pseudo_frac_
 fraction of branching candidates that are not trusted yet More...
 
int numberBeforeTrustedList_
 number of times a branch has to happen so that it is trusted in setupList More...
 
int numberStrongRoot_
 number of strong branching points at root node More...
 
int numberStrongBackup_
 backup of numberStrong_ before Root node solve More...
 
int numberLookAhead_
 number of look-ahead strong-branching steps More...
 
int minNumberStrongBranch_
 Always strong branch that many first candidate in the list regardless of numberTrusted. More...
 
OsiPseudoCosts pseudoCosts_
 Stores the pseudo costs. More...
 
int trustStrongForPseudoCosts_
 Wether or not to trust strong branching results for updating pseudo costs. More...
 

Private Member Functions

 CouenneChooseStrong ()
 Default Constructor, forbidden for some reason. More...
 
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. More...
 

Additional Inherited Members

- Public Types inherited from Bonmin::BonChooseVariable
enum  DoStrongReturnStatuses {
  provenInfeasible = -1, doneNoFixing, doneCanFix, interuptedCanFix,
  maxTime
}
 
enum  chooseVariableReturnStatuses {
  infeasibleNode = -1, hasCandidate, feasibleNode, canFixAndStrongBranch,
  canFixAndBranch, canFixNoCandidate
}
 Return statuses for chooseVariable. More...
 
enum  Messages_Types {
  PS_COST_HISTORY = 0, PS_COST_MULT, PS_COST_ESTIMATES, CANDIDATE_LIST,
  CANDIDATE_LIST2, CANDIDATE_LIST3, SB_START, SB_HEADER,
  SB_RES, BRANCH_VAR, CHOSEN_VAR, UPDATE_PS_COST,
  BON_CHOOSE_MESSAGES_DUMMY_END
}
 
- Protected Types inherited from Bonmin::BonChooseVariable
enum  StrongStatus { NotDone =-1, Feasible, Infeasible, NotFinished }
 Statuses for strong branching candidates. More...
 
- Static Protected Attributes inherited from Bonmin::BonChooseVariable
static const std::string CNAME = "BonChooseVariable"
 Stores the class name for throwing errors. More...
 

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)

constructor

Definition at line 43 of file CouenneChooseStrong.cpp.

CouenneChooseStrong::CouenneChooseStrong ( const CouenneChooseStrong rhs)

Copy constructor.

copy constructor

Definition at line 67 of file CouenneChooseStrong.cpp.

CouenneChooseStrong::~CouenneChooseStrong ( )
virtual

Destructor.

destructor

Definition at line 77 of file CouenneChooseStrong.cpp.

Couenne::CouenneChooseStrong::CouenneChooseStrong ( )
private

Default Constructor, forbidden for some reason.

Member Function Documentation

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

Assignment operator.

assignment operator

Definition at line 87 of file CouenneChooseStrong.cpp.

OsiChooseVariable * CouenneChooseStrong::clone ( ) const
virtual

Clone.

cloning method

Reimplemented from Bonmin::BonChooseVariable.

Definition at line 82 of file CouenneChooseStrong.cpp.

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 712 of file CouenneChooseStrong.cpp.

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

Definition at line 89 of file StrongBranchingSetupList.cpp.

int CouenneChooseStrong::doStrongBranching ( OsiSolverInterface *  solver,
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.

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 889 of file CouenneChooseStrong.cpp.

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 221 of file CouenneChooseStrong.cpp.

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

Add list of options to be read from file.

Add list of options to be read from file ////////////////////////////////////////.

Definition at line 847 of file CouenneChooseStrong.cpp.

void CouenneChooseStrong::printObjViol ( OsiBranchingInformation *  info)
private

Definition at line 904 of file CouenneChooseStrong.cpp.

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

Definition at line 106 of file CouenneChooseStrong.cpp.

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 183 of file CouenneChooseStrong.cpp.

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 436 of file doStrongBranching.cpp.

Member Data Documentation

CouenneProblem* Couenne::CouenneChooseStrong::problem_
protected

Pointer to the associated MINLP problem.

Definition at line 119 of file CouenneChooseStrong.hpp.

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.

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.

JnlstPtr Couenne::CouenneChooseStrong::jnlst_
protected

pointer to journalist for detailed information

Definition at line 138 of file CouenneChooseStrong.hpp.

double Couenne::CouenneChooseStrong::branchtime_
protected

total time spent in strong branching

Definition at line 141 of file CouenneChooseStrong.hpp.


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