- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# OsiChooseStrong Class Reference

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

`#include <OsiChooseVariable.hpp>`

Inheritance diagram for OsiChooseStrong:

[legend]
Collaboration diagram for OsiChooseStrong:

[legend]
List of all members.

## 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.
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.
const OsiPseudoCosts & | pseudoCosts () const
| Accessor method to pseudo cost object.
OsiPseudoCosts & | pseudoCosts ()
| Accessor method to pseudo cost object.
int | numberBeforeTrusted () const
| A feww pass-through methods to access members of pseudoCosts_ as if they were members of OsiChooseStrong object.
void | setNumberBeforeTrusted (int value)
int | numberObjects () const
## Protected Member Functions
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.
void | resetResults (int num)
| Clear out the results array.
## Protected Attributes
int | shadowPriceMode_
| Pseudo Shadow Price mode 0 - off 1 - use and multiply by strong info 2 - use.
OsiPseudoCosts | pseudoCosts_
| The pseudo costs for the chooser.
OsiHotInfo * | results_
| The results of the strong branching done on the candidates where the pseudocosts were not sufficient.
int | numResults_
| The number of OsiHotInfo objetcs that contain information.

## Detailed Description

This class chooses a variable to branch on.

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 316 of file OsiChooseVariable.hpp.

## Constructor & Destructor Documentation

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.

## Member Function Documentation

OsiChooseStrong& OsiChooseStrong::operator= | ( | const OsiChooseStrong & | rhs | ) |

Assignment operator.

virtual OsiChooseVariable* OsiChooseStrong::clone | ( |  | ) | const`[virtual]`

Clone.

Reimplemented from OsiChooseVariable.

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.

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 364 of file OsiChooseVariable.hpp.

References shadowPriceMode_.

void OsiChooseStrong::setShadowPriceMode | ( | int | value | ) | `[inline]`

Set Shadow price mode.

Definition at line 367 of file OsiChooseVariable.hpp.

References shadowPriceMode_.

const OsiPseudoCosts& OsiChooseStrong::pseudoCosts | ( |  | ) | const`[inline]`

Accessor method to pseudo cost object.

Definition at line 371 of file OsiChooseVariable.hpp.

References pseudoCosts_.

OsiPseudoCosts& OsiChooseStrong::pseudoCosts | ( |  | ) | `[inline]`

Accessor method to pseudo cost object.

Definition at line 375 of file OsiChooseVariable.hpp.

References pseudoCosts_.

int OsiChooseStrong::numberBeforeTrusted | ( |  | ) | const`[inline]`

A feww pass-through methods to access members of pseudoCosts_ as if they were members of OsiChooseStrong object.

Definition at line 380 of file OsiChooseVariable.hpp.

References OsiPseudoCosts::numberBeforeTrusted(), and pseudoCosts_.

void OsiChooseStrong::setNumberBeforeTrusted | ( | int | value | ) | `[inline]`

Definition at line 382 of file OsiChooseVariable.hpp.

References pseudoCosts_, and OsiPseudoCosts::setNumberBeforeTrusted().

int OsiChooseStrong::numberObjects | ( |  | ) | const`[inline]`

Definition at line 384 of file OsiChooseVariable.hpp.

References OsiPseudoCosts::numberObjects(), and pseudoCosts_.

int OsiChooseStrong::doStrongBranching | ( | OsiSolverInterface * | solver,
|  | OsiBranchingInformation * | info,
|  | int | numberToDo,
|  | int | returnCriterion |
| ) |  |  | `[protected]`

This is a utility function which does strong branching on a list of objects and stores the results in OsiHotInfo.objects.

On entry the object sequence is stored in the OsiHotInfo object and maybe more. It returns - -1 - one branch was infeasible both ways 0 - all inspected - nothing can be fixed 1 - all inspected - some can be fixed (returnCriterion==0) 2 - may be returning early - one can be fixed (last one done) (returnCriterion==1) 3 - returning because max time

void OsiChooseStrong::resetResults | ( | int | num | ) | `[protected]`

Clear out the results array.

## Member Data Documentation

int OsiChooseStrong::shadowPriceMode_`[protected]`

Pseudo Shadow Price mode 0 - off 1 - use and multiply by strong info 2 - use.

Definition at line 414 of file OsiChooseVariable.hpp.

Referenced by setShadowPriceMode(), and shadowPriceMode().

OsiPseudoCosts OsiChooseStrong::pseudoCosts_`[protected]`

The pseudo costs for the chooser.

Definition at line 417 of file OsiChooseVariable.hpp.

Referenced by numberBeforeTrusted(), numberObjects(), pseudoCosts(), and setNumberBeforeTrusted().

OsiHotInfo* OsiChooseStrong::results_`[protected]`

The results of the strong branching done on the candidates where the pseudocosts were not sufficient.

Definition at line 421 of file OsiChooseVariable.hpp.

int OsiChooseStrong::numResults_`[protected]`

The number of OsiHotInfo objetcs that contain information.

Definition at line 423 of file OsiChooseVariable.hpp.

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

- /home/coin/SVN-release/Alps-1.2.1/Osi/src/Osi/OsiChooseVariable.hpp