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