Go to the documentation of this file.
3 #ifndef BonChooseVariable_H
4 #define BonChooseVariable_H
7 #ifdef BONMIN_CURVATURE_BRANCHING
16 #define OLD_USEFULLNESS
49 return infeasibilities_[1];
54 return infeasibilities_[0];
61 infeasibilities_[1] = x;
67 infeasibilities_[0] = x;
98 int numberToDo,
int returnCriterion);
99 #ifndef OLD_USEFULLNESS
101 enum CandidateSortCriterion {
190 const double upMult,
const double dowMult,
193 double& value2)
const;
232 double changeInObjective,
double changeInValue,
324 #ifndef OLD_USEFULLNESS
326 CandidateSortCriterion sortCrit_;
double maxmin_crit_have_sol_
maxmin weight in branching decision when no solution has been found yet
CoinMessageHandler * handler_
Message handler.
OsiBranchingObject * branchingObject_
int numberLookAhead_
number of look-ahead strong-branching steps
@ NotFinished
Child is not finished.
int trustStrongForPseudoCosts_
Wether or not to trust strong branching results for updating pseudo costs.
@ BON_CHOOSE_MESSAGES_DUMMY_END
virtual OsiChooseVariable * clone() const
Clone.
virtual int doStrongBranching(OsiSolverInterface *solver, 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...
int number_not_trusted_
Number of variables put into the list because there were not trusted.
void setCbcModel(CbcModel *cbc_model)
Method for setting CbcModel, which is used to get statusOfSearch.
void setLogLevel(int value)
(C) Copyright International Business Machines Corporation 2007
double maxminCrit(const OsiBranchingInformation *info) const
Helper functions for setupList and chooseVariable.
@ interuptedCanFix
Interupted and found a variable to fix.
virtual CoinMessageHandler * clone() const
@ canFixAndBranch
Found variable to fix and also has a (non-strong) branching candidate.
Ipopt::SmartPtr< Ipopt::Journalist > jnlst_
Holding on the a pointer to the journalist.
@ canFixNoCandidate
Can fix variables but does not have strong branching candidates.
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
A class to have all elements necessary to setup a branch-and-bound.
@ feasibleNode
All variable are feasible, the node is feasible.
This class chooses a variable to branch on.
double downInfeasibility() const
down infeasibility
virtual int setupList(OsiBranchingInformation *info, bool initialize)
Sets up strong list and clears all if initialize is true.
int minNumberStrongBranch_
Always strong branch that many first candidate in the list regardless of numberTrusted.
@ hasCandidate
Normal termination, found a variable to branch on.
int determineStatus(OsiSolverInterface *solver) const
Determine status of strong branching solution.
double maxmin_crit_no_sol_
maxmin weight in branching decision when no solution has been found yet
HotInfo & operator=(const HotInfo &rhs)
Assignment operator.
@ Infeasible
Child is proven infeasible.
OsiPseudoCosts pseudoCosts_
Stores the pseudo costs.
int updateInformation(const OsiSolverInterface *solver, const OsiBranchingInformation *info, OsiChooseVariable *choose)
Fill in some usefull information after a strong branching is done:
BonChooseVariable & operator=(const BonChooseVariable &rhs)
Assignment operator.
const OsiPseudoCosts & pseudoCosts() const
Access to pseudo costs storage.
int bb_log_level_
verbosity level
virtual bool isIterationLimitReached() const=0
double setup_pseudo_frac_
fraction of branching candidates that are not trusted yet
void computeMultipliers(double &upMult, double &downMult) const
chooseVariableReturnStatuses
Return statuses for chooseVariable.
bool isRootNode(const OsiBranchingInformation *info) const
detecting if this is root node
@ doneCanFix
Several variable can be fixed.
Messages messages_
Messages.
void passInMessageHandler(CoinMessageHandler *handler)
virtual int chooseVariable(OsiSolverInterface *solver, OsiBranchingInformation *info, bool fixVariables)
Choose a variable Returns - -1 Node is infeasible 0 Normal termination - we have a candidate 1 All lo...
HotInfo()
Default constructor.
bool only_pseudo_when_trusted_
Flag indicating whether we don't want to mix strong branching and pseudo costs during the decision wh...
vector< HotInfo > results_
Stores strong branching results.
void setOnlyPseudoWhenTrusted(bool only_pseudo_when_trusted)
virtual bool isProvenOptimal() const=0
int numberStrongRoot_
number of strong branching points at root node
virtual bool isDualObjectiveLimitReached() const
CbcModel * cbc_model_
CbcModel, used to get status of search.
double upInfeasibility() const
up infeasibility
@ maxTime
Interupted because of time limit.
OsiPseudoCosts & pseudoCosts()
Access to pseudo costs storage.
StrongStatus
Statuses for strong branching candidates.
@ Feasible
Child is proven feasible.
double computeUsefulness(const double MAXMIN_CRITERION, const double upMult, const double dowMult, const double value, const OsiObject *object, int i, double &value2) const
virtual ~BonChooseVariable()
Destructor.
CoinMessageHandler & message(int messageNumber, const CoinMessages &messages)
@ canFixAndStrongBranch
Found variable to fix and also has remaining candidate for strong branching.
void setDownInfeasibility(double x)
Set the down infeasibility.
int numberBeforeTrustedList_
number of times a branch has to happen so that it is trusted in setupList
CoinMessageHandler & message(Messages_Types type) const
static const std::string CNAME
Stores the class name for throwing errors.
virtual OsiHotInfo * clone() const
Clone.
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...
int numberBranches() const
@ doneNoFixing
All done no variable can be fixed.
int numberStrongBackup_
backup of numberStrong_ before Root node solve
void setUpInfeasibility(double x)
Set the down infeasibility.
virtual ~HotInfo()
Destructor.