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

#include <CouenneChooseStrong.hpp>

+ Inheritance diagram for Couenne::CouenneChooseStrong:
+ Collaboration diagram for Couenne::CouenneChooseStrong:

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 OsiChooseVariableclone () 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)
 
 BonChooseVariable (const BonChooseVariable &)
 
BonChooseVariableoperator= (const BonChooseVariable &rhs)
 
virtual OsiChooseVariableclone () const
 
virtual ~BonChooseVariable ()
 
double maxminCrit (const OsiBranchingInformation *info) const
 
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 int setupList (OsiBranchingInformation *info, bool initialize)
 
virtual int chooseVariable (OsiSolverInterface *solver, OsiBranchingInformation *info, bool fixVariables)
 
virtual void updateInformation (const OsiBranchingInformation *info, int branch, OsiHotInfo *hotInfo)
 
virtual void updateInformation (int whichObject, int branch, double changeInObjective, double changeInValue, int status)
 
void setCbcModel (CbcModel *cbc_model)
 
void setOnlyPseudoWhenTrusted (bool only_pseudo_when_trusted)
 
const OsiPseudoCostspseudoCosts () const
 
OsiPseudoCostspseudoCosts ()
 
void passInMessageHandler (CoinMessageHandler *handler)
 
CoinMessageHandlermessage (Messages_Types type) const
 
- Public Member Functions inherited from OsiChooseVariable
 OsiChooseVariable ()
 
 OsiChooseVariable (const OsiSolverInterface *solver)
 
 OsiChooseVariable (const OsiChooseVariable &)
 
OsiChooseVariableoperator= (const OsiChooseVariable &rhs)
 
virtual OsiChooseVariableclone () const
 
virtual ~OsiChooseVariable ()
 
virtual int setupList (OsiBranchingInformation *info, bool initialize)
 
virtual int chooseVariable (OsiSolverInterface *solver, OsiBranchingInformation *info, bool fixVariables)
 
virtual bool feasibleSolution (const OsiBranchingInformation *info, const double *solution, int numberObjects, const OsiObject **objects)
 
void saveSolution (const OsiSolverInterface *solver)
 
void clearGoodSolution ()
 
virtual void updateInformation (const OsiBranchingInformation *info, int branch, OsiHotInfo *hotInfo)
 
virtual void updateInformation (int whichObject, int branch, double changeInObjective, double changeInValue, int status)
 
double goodObjectiveValue () const
 
double upChange () const
 
double downChange () const
 
const double * goodSolution () const
 
int bestObjectIndex () const
 
void setBestObjectIndex (int value)
 
int bestWhichWay () const
 
void setBestWhichWay (int value)
 
int firstForcedObjectIndex () const
 
void setFirstForcedObjectIndex (int value)
 
int firstForcedWhichWay () const
 
void setFirstForcedWhichWay (int value)
 
int numberUnsatisfied () const
 
int numberStrong () const
 
void setNumberStrong (int value)
 
int numberOnList () const
 
int numberStrongDone () const
 
int numberStrongIterations () const
 
int numberStrongFixed () const
 
const int * candidates () const
 
bool trustStrongForBound () const
 
void setTrustStrongForBound (bool yesNo)
 
bool trustStrongForSolution () const
 
void setTrustStrongForSolution (bool yesNo)
 
void setSolver (const OsiSolverInterface *solver)
 
int status () const
 
void setStatus (int value)
 

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
virtual int doStrongBranching (OsiSolverInterface *solver, OsiBranchingInformation *info, int numberToDo, int returnCriterion)
 
int determineStatus (OsiSolverInterface *solver) const
 
bool isRootNode (const OsiBranchingInformation *info) const
 

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
 NotDone
 
 Feasible
 
 Infeasible
 
 NotFinished
 
Ipopt::SmartPtr< Ipopt::Journalistjnlst_
 
int bb_log_level_
 
vector< HotInforesults_
 
CbcModelcbc_model_
 
bool only_pseudo_when_trusted_
 
int number_not_trusted_
 
CoinMessageHandlerhandler_
 
Messages messages_
 
double maxmin_crit_no_sol_
 
double maxmin_crit_have_sol_
 
double setup_pseudo_frac_
 
int numberBeforeTrustedList_
 
int numberStrongRoot_
 
int numberStrongBackup_
 
int numberLookAhead_
 
int minNumberStrongBranch_
 
OsiPseudoCosts pseudoCosts_
 
int trustStrongForPseudoCosts_
 
- Protected Attributes inherited from OsiChooseVariable
double goodObjectiveValue_
 
double upChange_
 
double downChange_
 
double * goodSolution_
 
int * list_
 
double * useful_
 
const OsiSolverInterfacesolver_
 
int status_
 
int bestObjectIndex_
 
int bestWhichWay_
 
int firstForcedObjectIndex_
 
int firstForcedWhichWay_
 
int numberUnsatisfied_
 
int numberStrong_
 
int numberOnList_
 
int numberStrongDone_
 
int numberStrongIterations_
 
int numberStrongFixed_
 
bool trustStrongForBound_
 
bool trustStrongForSolution_
 

Additional Inherited Members

- Public Types inherited from Bonmin::BonChooseVariable
enum  DoStrongReturnStatuses
 
enum  chooseVariableReturnStatuses
 
enum  Messages_Types
 
- Public Attributes inherited from Bonmin::BonChooseVariable
 provenInfeasible
 
 doneNoFixing
 
 doneCanFix
 
 interuptedCanFix
 
 maxTime
 
 infeasibleNode
 
 hasCandidate
 
 feasibleNode
 
 canFixAndStrongBranch
 
 canFixAndBranch
 
 canFixNoCandidate
 
 PS_COST_HISTORY
 
 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
 
- Static Protected Attributes inherited from Bonmin::BonChooseVariable
static const std::string CNAME
 

Detailed Description

Definition at line 23 of file CouenneChooseStrong.hpp.

Constructor & Destructor Documentation

◆ CouenneChooseStrong() [1/2]

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

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

◆ CouenneChooseStrong() [2/2]

Couenne::CouenneChooseStrong::CouenneChooseStrong ( const CouenneChooseStrong )

Copy constructor.

◆ ~CouenneChooseStrong()

virtual Couenne::CouenneChooseStrong::~CouenneChooseStrong ( )
virtual

Destructor.

Member Function Documentation

◆ operator=()

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

Assignment operator.

◆ clone()

virtual OsiChooseVariable * Couenne::CouenneChooseStrong::clone ( ) const
virtual

Clone.

Reimplemented from Bonmin::BonChooseVariable.

◆ setupList()

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

◆ gutsOfSetupList()

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

◆ doStrongBranching()

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

◆ feasibleSolution()

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

Returns true if solution looks feasible against given objects.

Reimplemented from OsiChooseVariable.

◆ chooseVariable()

virtual int Couenne::CouenneChooseStrong::chooseVariable ( OsiSolverInterface solver,
OsiBranchingInformation info,
bool  fixVariables 
)
virtual

choose object to branch based on earlier setup

Reimplemented from Bonmin::BonChooseVariable.

◆ registerOptions()

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

Add list of options to be read from file.

◆ simulateBranch()

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

does one side of the branching

Member Data Documentation

◆ problem_

CouenneProblem* Couenne::CouenneChooseStrong::problem_
protected

Pointer to the associated MINLP problem.

Definition at line 119 of file CouenneChooseStrong.hpp.

◆ pseudoUpdateLP_

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.

◆ estimateProduct_

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.

◆ jnlst_

JnlstPtr Couenne::CouenneChooseStrong::jnlst_
protected

pointer to journalist for detailed information

Definition at line 138 of file CouenneChooseStrong.hpp.

◆ branchtime_

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 file: