Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
OsiChooseStrongSubset Class Reference

This class chooses a variable to branch on. More...

#include <CbcLinked.hpp>

+ Inheritance diagram for OsiChooseStrongSubset:
+ Collaboration diagram for OsiChooseStrongSubset:

Public Member Functions

 OsiChooseStrongSubset ()
 Default Constructor. More...
 
 OsiChooseStrongSubset (const OsiSolverInterface *solver)
 Constructor from solver (so we can set up arrays etc) More...
 
 OsiChooseStrongSubset (const OsiChooseStrongSubset &)
 Copy constructor. More...
 
OsiChooseStrongSubsetoperator= (const OsiChooseStrongSubset &rhs)
 Assignment operator. More...
 
virtual OsiChooseVariableclone () const
 Clone. More...
 
virtual ~OsiChooseStrongSubset ()
 Destructor. More...
 
virtual int setupList (OsiBranchingInformation *info, bool initialize)
 Sets up strong list and clears all if initialize is true. More...
 
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 looks satisfied - no candidate 2 We can change the bound on a variable - but we also have a strong branching candidate 3 We can change the bound on a variable - but we have a non-strong branching candidate 4 We can change the bound on a variable - no other candidates We can pick up branch from bestObjectIndex() and bestWhichWay() We can pick up a forced branch (can change bound) from firstForcedObjectIndex() and firstForcedWhichWay() If we have a solution then we can pick up from goodObjectiveValue() and goodSolution() If fixVariables is true then 2,3,4 are all really same as problem changed. More...
 
int numberObjectsToUse () const
 Number of objects to use. More...
 
void setNumberObjectsToUse (int value)
 Set number of objects to use. More...
 
- Public Member Functions inherited from OsiChooseStrong
 OsiChooseStrong ()
 Default Constructor. More...
 
 OsiChooseStrong (const OsiSolverInterface *solver)
 Constructor from solver (so we can set up arrays etc) More...
 
 OsiChooseStrong (const OsiChooseStrong &)
 Copy constructor. More...
 
OsiChooseStrongoperator= (const OsiChooseStrong &rhs)
 Assignment operator. More...
 
virtual ~OsiChooseStrong ()
 Destructor. More...
 
int shadowPriceMode () const
 Pseudo Shadow Price mode 0 - off 1 - use if no strong info 2 - use if strong not trusted 3 - use even if trusted. More...
 
void setShadowPriceMode (int value)
 Set Shadow price mode. More...
 
const OsiPseudoCostspseudoCosts () const
 Accessor method to pseudo cost object. More...
 
OsiPseudoCostspseudoCosts ()
 Accessor method to pseudo cost object. More...
 
int numberBeforeTrusted () const
 A feww pass-through methods to access members of pseudoCosts_ as if they were members of OsiChooseStrong object. More...
 
void setNumberBeforeTrusted (int value)
 
int numberObjects () const
 
- Public Member Functions inherited from OsiChooseVariable
 OsiChooseVariable ()
 Default Constructor. More...
 
 OsiChooseVariable (const OsiSolverInterface *solver)
 Constructor from solver (so we can set up arrays etc) More...
 
 OsiChooseVariable (const OsiChooseVariable &)
 Copy constructor. More...
 
OsiChooseVariableoperator= (const OsiChooseVariable &rhs)
 Assignment operator. More...
 
virtual ~OsiChooseVariable ()
 Destructor. 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...
 
void saveSolution (const OsiSolverInterface *solver)
 Saves a good solution. More...
 
void clearGoodSolution ()
 Clears out good solution after use. More...
 
virtual void updateInformation (const OsiBranchingInformation *info, int branch, OsiHotInfo *hotInfo)
 Given a candidate fill in useful information e.g. estimates. 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...
 
double goodObjectiveValue () const
 Objective value for feasible solution. More...
 
double upChange () const
 Estimate of up change or change on chosen if n-way. More...
 
double downChange () const
 Estimate of down change or max change on other possibilities if n-way. More...
 
const double * goodSolution () const
 Good solution - deleted by finalize. More...
 
int bestObjectIndex () const
 Index of chosen object. More...
 
void setBestObjectIndex (int value)
 Set index of chosen object. More...
 
int bestWhichWay () const
 Preferred way of chosen object. More...
 
void setBestWhichWay (int value)
 Set preferred way of chosen object. More...
 
int firstForcedObjectIndex () const
 Index of forced object. More...
 
void setFirstForcedObjectIndex (int value)
 Set index of forced object. More...
 
int firstForcedWhichWay () const
 Preferred way of forced object. More...
 
void setFirstForcedWhichWay (int value)
 Set preferred way of forced object. More...
 
int numberUnsatisfied () const
 Get the number of objects unsatisfied at this node - accurate on first pass. More...
 
int numberStrong () const
 Number of objects to choose for strong branching. More...
 
void setNumberStrong (int value)
 Set number of objects to choose for strong branching. More...
 
int numberOnList () const
 Number left on strong list. More...
 
int numberStrongDone () const
 Number of strong branches actually done. More...
 
int numberStrongIterations () const
 Number of strong iterations actually done. More...
 
int numberStrongFixed () const
 Number of strong branches which changed bounds. More...
 
const int * candidates () const
 List of candidates. More...
 
bool trustStrongForBound () const
 Trust results from strong branching for changing bounds. More...
 
void setTrustStrongForBound (bool yesNo)
 Set trust results from strong branching for changing bounds. More...
 
bool trustStrongForSolution () const
 Trust results from strong branching for valid solution. More...
 
void setTrustStrongForSolution (bool yesNo)
 Set trust results from strong branching for valid solution. More...
 
void setSolver (const OsiSolverInterface *solver)
 Set solver and redo arrays. More...
 
int status () const
 Return status - -1 Node is infeasible 0 Normal termination - we have a candidate 1 All looks satisfied - no candidate 2 We can change the bound on a variable - but we also have a strong branching candidate 3 We can change the bound on a variable - but we have a non-strong branching candidate 4 We can change the bound on a variable - no other candidates We can pick up branch from bestObjectIndex() and bestWhichWay() We can pick up a forced branch (can change bound) from firstForcedObjectIndex() and firstForcedWhichWay() If we have a solution then we can pick up from goodObjectiveValue() and goodSolution() More...
 
void setStatus (int value)
 

Protected Attributes

int numberObjectsToUse_
 Number of objects to be used (and set in solver) More...
 
- Protected Attributes inherited from OsiChooseStrong
int shadowPriceMode_
 Pseudo Shadow Price mode 0 - off 1 - use and multiply by strong info 2 - use. More...
 
OsiPseudoCosts pseudoCosts_
 The pseudo costs for the chooser. More...
 
OsiHotInforesults_
 The results of the strong branching done on the candidates where the pseudocosts were not sufficient. More...
 
int numResults_
 The number of OsiHotInfo objetcs that contain information. More...
 
- Protected Attributes inherited from OsiChooseVariable
double goodObjectiveValue_
 Objective value for feasible solution. More...
 
double upChange_
 Estimate of up change or change on chosen if n-way. More...
 
double downChange_
 Estimate of down change or max change on other possibilities if n-way. More...
 
double * goodSolution_
 Good solution - deleted by finalize. More...
 
int * list_
 List of candidates. More...
 
double * useful_
 Useful array (for sorting etc) More...
 
const OsiSolverInterfacesolver_
 Pointer to solver. More...
 
int status_
 
int bestObjectIndex_
 Index of chosen object. More...
 
int bestWhichWay_
 Preferred way of chosen object. More...
 
int firstForcedObjectIndex_
 Index of forced object. More...
 
int firstForcedWhichWay_
 Preferred way of forced object. More...
 
int numberUnsatisfied_
 The number of objects unsatisfied at this node. More...
 
int numberStrong_
 Number of objects to choose for strong branching. More...
 
int numberOnList_
 Number left on strong list. More...
 
int numberStrongDone_
 Number of strong branches actually done. More...
 
int numberStrongIterations_
 Number of strong iterations actually done. More...
 
int numberStrongFixed_
 Number of bound changes due to strong branching. More...
 
bool trustStrongForBound_
 List of unsatisfied objects - first numberOnList_ for strong branching Trust results from strong branching for changing bounds. More...
 
bool trustStrongForSolution_
 Trust results from strong branching for valid solution. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OsiChooseStrong
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 OsiHotInfo.objects. More...
 
void resetResults (int num)
 Clear out the results array. More...
 

Detailed Description

This class chooses a variable to branch on.

This is just as OsiChooseStrong but it fakes it so only first so many are looked at in this phase

Definition at line 1240 of file CbcLinked.hpp.

Constructor & Destructor Documentation

OsiChooseStrongSubset::OsiChooseStrongSubset ( )

Default Constructor.

OsiChooseStrongSubset::OsiChooseStrongSubset ( const OsiSolverInterface solver)

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

OsiChooseStrongSubset::OsiChooseStrongSubset ( const OsiChooseStrongSubset )

Copy constructor.

virtual OsiChooseStrongSubset::~OsiChooseStrongSubset ( )
virtual

Destructor.

Member Function Documentation

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

Assignment operator.

virtual OsiChooseVariable* OsiChooseStrongSubset::clone ( ) const
virtual

Clone.

Reimplemented from OsiChooseStrong.

virtual int OsiChooseStrongSubset::setupList ( OsiBranchingInformation info,
bool  initialize 
)
virtual

Sets up strong list and clears all if initialize is true.

Returns number of infeasibilities. If returns -1 then has worked out node is infeasible!

Reimplemented from OsiChooseStrong.

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

Choose a variable Returns - -1 Node is infeasible 0 Normal termination - we have a candidate 1 All looks satisfied - no candidate 2 We can change the bound on a variable - but we also have a strong branching candidate 3 We can change the bound on a variable - but we have a non-strong branching candidate 4 We can change the bound on a variable - no other candidates We can pick up branch from bestObjectIndex() and bestWhichWay() We can pick up a forced branch (can change bound) from firstForcedObjectIndex() and firstForcedWhichWay() If we have a solution then we can pick up from goodObjectiveValue() and goodSolution() If fixVariables is true then 2,3,4 are all really same as problem changed.

Reimplemented from OsiChooseStrong.

int OsiChooseStrongSubset::numberObjectsToUse ( ) const
inline

Number of objects to use.

Definition at line 1282 of file CbcLinked.hpp.

void OsiChooseStrongSubset::setNumberObjectsToUse ( int  value)
inline

Set number of objects to use.

Definition at line 1287 of file CbcLinked.hpp.

Member Data Documentation

int OsiChooseStrongSubset::numberObjectsToUse_
protected

Number of objects to be used (and set in solver)

Definition at line 1295 of file CbcLinked.hpp.


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