Go to the documentation of this file.
5 #ifndef OsiChooseVariable_H
6 #define OsiChooseVariable_H
11 #include "CoinWarmStartBasis.hpp"
75 const double *solution,
88 double changeInObjective,
double changeInValue,
355 double changeInObjective,
double changeInValue,
473 int numberToDo,
int returnCriterion);
const double * downTotalChange() const
double * goodSolution_
Good solution - deleted by finalize.
double * changes_
Objective changes.
void setTrustStrongForSolution(bool yesNo)
Set trust results from strong branching for valid solution.
OsiBranchingObject * branchingObject_
Branching object.
virtual void updateInformation(const OsiBranchingInformation *info, int branch, OsiHotInfo *hotInfo)
Given a candidate fill in useful information e.g. estimates.
bool trustStrongForSolution() const
Trust results from strong branching for valid solution.
virtual OsiChooseVariable * clone() const
Clone.
int bestWhichWay() const
Preferred way of chosen object.
Abstract base class for ‘objects’.
const OsiPseudoCosts & pseudoCosts() const
Accessor method to pseudo cost object.
int numberObjects() const
Give the number of objects for which pseudo costs are stored.
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...
This class is the placeholder for the pseudocosts used by OsiChooseStrong.
int * list_
List of candidates.
double downChange() const
Estimate of down change or max change on other possibilities if n-way.
int upStatus() const
Up status - invalid if n-way.
bool trustStrongForBound() const
Trust results from strong branching for changing bounds.
int upIterationCount() const
Up iteration count - invalid if n-way.
int numberBeforeTrusted() const
A feww pass-through methods to access members of pseudoCosts_ as if they were members of OsiChooseStr...
double downChange() const
Down change - invalid if n-way.
void setNumberBeforeTrusted(int value)
Set number of times before trusted.
int numberStrongFixed_
Number of bound changes due to strong branching.
void setBestWhichWay(int value)
Set preferred way of chosen object.
int numResults_
The number of OsiHotInfo objetcs that contain information.
int numberStrongFixed() const
Number of strong branches which changed bounds.
void clearGoodSolution()
Clears out good solution after use.
const double * upTotalChange() const
int shadowPriceMode_
Pseudo Shadow Price mode 0 - off 1 - use and multiply by strong info 2 - use.
int numberOnList() const
Number left on strong list.
void setBestObjectIndex(int value)
Set index of chosen object.
void setDownChange(double value)
Set down change - invalid if n-way.
virtual OsiHotInfo * clone() const
Clone.
int updateInformation(const OsiSolverInterface *solver, const OsiBranchingInformation *info, OsiChooseVariable *choose)
Fill in useful information after strong branch.
void setNumberStrong(int value)
Set number of objects to choose for strong branching.
int * downNumber_
Number of times down.
virtual OsiChooseVariable * clone() const
Clone.
const int * upNumber() const
int bestObjectIndex_
Index of chosen object.
bool trustStrongForSolution_
Trust results from strong branching for valid solution.
virtual ~OsiChooseVariable()
Destructor.
void setStatus(int value)
const OsiSolverInterface * solver_
Pointer to solver.
int numberBeforeTrusted_
Number before we trust.
void gutsOfCopy(const OsiPseudoCosts &rhs)
double * downTotalChange_
Total of all changes down.
void setFirstForcedObjectIndex(int value)
Set index of forced object.
OsiChooseStrong & operator=(const OsiChooseStrong &rhs)
Assignment operator.
OsiPseudoCosts & operator=(const OsiPseudoCosts &rhs)
This class chooses a variable to branch on.
double goodObjectiveValue() const
Objective value for feasible solution.
OsiChooseStrong()
Default Constructor.
int downStatus() const
Down status - invalid if n-way.
void setShadowPriceMode(int value)
Set Shadow price mode.
OsiChooseVariable()
Default Constructor.
int numberStrong_
Number of objects to choose for strong branching.
virtual bool feasibleSolution(const OsiBranchingInformation *info, const double *solution, int numberObjects, const OsiObject **objects)
Returns true if solution looks feasible against given objects.
virtual ~OsiChooseStrong()
Destructor.
int status(int k) const
Status on way k.
double downChange_
Estimate of down change or max change on other possibilities if n-way.
double originalObjectiveValue_
Original objective value.
int * upNumber_
Number of times up.
int whichObject_
Which object on list.
void setTrustStrongForBound(bool yesNo)
Set trust results from strong branching for changing bounds.
int numberStrongDone_
Number of strong branches actually done.
This class contains the result of strong branching on a variable When created it stores enough inform...
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 numberStrongDone() const
Number of strong branches actually done.
int firstForcedWhichWay() const
Preferred way of forced object.
void setUpStatus(int value)
Set up status - invalid if n-way.
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...
OsiPseudoCosts pseudoCosts_
The pseudo costs for the chooser.
int firstForcedObjectIndex() const
Index of forced object.
virtual int setupList(OsiBranchingInformation *info, bool initialize)
Sets up strong list and clears all if initialize is true.
int * statuses_
Status -1 - not done 0 - feasible and finished 1 - infeasible 2 - not finished.
int bestWhichWay_
Preferred way of chosen object.
void initialize(int n)
Initialize the pseudocosts with n entries.
void setNumberBeforeTrusted(int value)
int numberUnsatisfied_
The number of objects unsatisfied at this node.
const double * goodSolution() const
Good solution - deleted by finalize.
OsiChooseVariable & operator=(const OsiChooseVariable &rhs)
Assignment operator.
void setDownStatus(int value)
Set down status - invalid if n-way.
virtual void updateInformation(const OsiBranchingInformation *info, int branch, OsiHotInfo *hotInfo)
Given a candidate fill in useful information e.g. estimates.
int bestObjectIndex() const
Index of chosen object.
bool trustStrongForBound_
List of unsatisfied objects - first numberOnList_ for strong branching Trust results from strong bran...
const int * candidates() const
List of candidates.
double * downTotalChange()
OsiBranchingObject * branchingObject() const
Branching object.
int numberOnList_
Number left on strong list.
int numberStrongIterations_
Number of strong iterations actually done.
int downIterationCount() const
Down iteration count - invalid if n-way.
virtual ~OsiPseudoCosts()
int status() const
Return status - -1 Node is infeasible 0 Normal termination - we have a candidate 1 All looks satisfie...
double originalObjectiveValue() const
Original objective value.
int firstForcedObjectIndex_
Index of forced object.
virtual ~OsiHotInfo()
Destructor.
OsiHotInfo * results_
The results of the strong branching done on the candidates where the pseudocosts were not sufficient.
int numberObjects_
Number of objects (could be found from solver)
int numberStrong() const
Number of objects to choose for strong branching.
double * upTotalChange_
Total of all changes up.
double upChange() const
Up change - invalid if n-way.
int iterationCount(int k) const
Iteration count on way k.
Abstract branching object base class.
int numberObjects() const
int numberUnsatisfied() const
Get the number of objects unsatisfied at this node - accurate on first pass.
int numberBeforeTrusted() const
Number of times before trusted.
OsiHotInfo()
Default Constructor.
double upChange() const
Estimate of up change or change on chosen if n-way.
int shadowPriceMode() const
Pseudo Shadow Price mode 0 - off 1 - use if no strong info 2 - use if strong not trusted 3 - use even...
OsiHotInfo & operator=(const OsiHotInfo &rhs)
Assignment operator.
double goodObjectiveValue_
Objective value for feasible solution.
int numberStrongIterations() const
Number of strong iterations actually done.
This class chooses a variable to branch on.
void saveSolution(const OsiSolverInterface *solver)
Saves a good solution.
double change(int k) const
Change on way k.
int numberBranches() const
The number of branch arms created for this branching object.
void setFirstForcedWhichWay(int value)
Set preferred way of forced object.
int * iterationCounts_
Iteration counts.
int firstForcedWhichWay_
Preferred way of forced object.
virtual int setupList(OsiBranchingInformation *info, bool initialize)
Sets up strong list and clears all if initialize is true.
double upChange_
Estimate of up change or change on chosen if n-way.
Abstract Base Class for describing an interface to a solver.
void resetResults(int num)
Clear out the results array.
void setSolver(const OsiSolverInterface *solver)
Set solver and redo arrays.
const int * downNumber() const
OsiPseudoCosts & pseudoCosts()
Accessor method to pseudo cost object.
double * useful_
Useful array (for sorting etc)
void setUpChange(double value)
Set up change - invalid if n-way.