#include <OsiChooseVariable.hpp>
Inheritance diagram for OsiChooseStrong:
Public Member Functions | |
OsiChooseStrong () | |
Default Constructor. | |
OsiChooseStrong (const OsiSolverInterface *solver) | |
Constructor from solver (so we can set up arrays etc). | |
OsiChooseStrong (const OsiChooseStrong &) | |
Copy constructor. | |
OsiChooseStrong & | operator= (const OsiChooseStrong &rhs) |
Assignment operator. | |
virtual OsiChooseVariable * | clone () const |
Clone. | |
virtual | ~OsiChooseStrong () |
Destructor. | |
virtual int | setupList (OsiBranchingInformation *info, bool initialize) |
Sets up strong list and clears all if initialize is true. | |
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. | |
virtual void | updateInformation (const OsiBranchingInformation *info, int branch, OsiHotInfo *hotInfo) |
Given a candidate fill in useful information e.g. estimates. | |
int | numberBeforeTrusted () const |
Number of times before trusted. | |
void | setNumberBeforeTrusted (int value) |
Set number of times before trusted. | |
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. | |
void | setShadowPriceMode (int value) |
Set Shadow price mode. | |
Protected Attributes | |
double * | upTotalChange_ |
Total of all changes up. | |
double * | downTotalChange_ |
Total of all changes down. | |
int * | upNumber_ |
Number of times up. | |
int * | downNumber_ |
Number of times down. | |
int | numberObjects_ |
Number of objects (could be found from solver). | |
int | numberBeforeTrusted_ |
Number before we trust. | |
int | shadowPriceMode_ |
Pseudo Shadow Price mode 0 - off 1 - use and multiply by strong info 2 - use. |
This chooses the variable and direction with reliability strong branching.
The flow is : a) initialize the process. This decides on strong branching list and stores indices of all infeasible objects b) do strong branching on list. If list is empty then just choose one candidate and return without strong branching. If not empty then go through list and return best. However we may find that the node is infeasible or that we can fix a variable. If so we return and it is up to user to call again (after fixing a variable).
Definition at line 257 of file OsiChooseVariable.hpp.
OsiChooseStrong::OsiChooseStrong | ( | ) |
Default Constructor.
OsiChooseStrong::OsiChooseStrong | ( | const OsiSolverInterface * | solver | ) |
Constructor from solver (so we can set up arrays etc).
OsiChooseStrong::OsiChooseStrong | ( | const OsiChooseStrong & | ) |
Copy constructor.
virtual OsiChooseStrong::~OsiChooseStrong | ( | ) | [virtual] |
Destructor.
OsiChooseStrong& OsiChooseStrong::operator= | ( | const OsiChooseStrong & | rhs | ) |
Assignment operator.
virtual OsiChooseVariable* OsiChooseStrong::clone | ( | ) | const [virtual] |
virtual int OsiChooseStrong::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 OsiChooseVariable.
virtual int OsiChooseStrong::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 OsiChooseVariable.
virtual void OsiChooseStrong::updateInformation | ( | const OsiBranchingInformation * | info, | |
int | branch, | |||
OsiHotInfo * | hotInfo | |||
) | [virtual] |
int OsiChooseStrong::numberBeforeTrusted | ( | ) | const [inline] |
Number of times before trusted.
Definition at line 303 of file OsiChooseVariable.hpp.
References numberBeforeTrusted_.
void OsiChooseStrong::setNumberBeforeTrusted | ( | int | value | ) | [inline] |
Set number of times before trusted.
Definition at line 306 of file OsiChooseVariable.hpp.
References numberBeforeTrusted_.
int OsiChooseStrong::shadowPriceMode | ( | ) | const [inline] |
Pseudo Shadow Price mode 0 - off 1 - use if no strong info 2 - use if strong not trusted 3 - use even if trusted.
Definition at line 315 of file OsiChooseVariable.hpp.
References shadowPriceMode_.
void OsiChooseStrong::setShadowPriceMode | ( | int | value | ) | [inline] |
double* OsiChooseStrong::upTotalChange_ [protected] |
double* OsiChooseStrong::downTotalChange_ [protected] |
int* OsiChooseStrong::upNumber_ [protected] |
int* OsiChooseStrong::downNumber_ [protected] |
int OsiChooseStrong::numberObjects_ [protected] |
Number of objects (could be found from solver).
Definition at line 333 of file OsiChooseVariable.hpp.
int OsiChooseStrong::numberBeforeTrusted_ [protected] |
Number before we trust.
Definition at line 335 of file OsiChooseVariable.hpp.
Referenced by numberBeforeTrusted(), and setNumberBeforeTrusted().
int OsiChooseStrong::shadowPriceMode_ [protected] |
Pseudo Shadow Price mode 0 - off 1 - use and multiply by strong info 2 - use.
Definition at line 341 of file OsiChooseVariable.hpp.
Referenced by shadowPriceMode().