Osi
0.108.8
|
Define a single integer class. More...
#include <OsiBranchingObject.hpp>
Public Member Functions | |
OsiSimpleInteger () | |
Default Constructor. More... | |
OsiSimpleInteger (const OsiSolverInterface *solver, int iColumn) | |
Useful constructor - passed solver index. More... | |
OsiSimpleInteger (int iColumn, double lower, double upper) | |
Useful constructor - passed solver index and original bounds. More... | |
OsiSimpleInteger (const OsiSimpleInteger &) | |
Copy constructor. More... | |
virtual OsiObject * | clone () const |
Clone. More... | |
OsiSimpleInteger & | operator= (const OsiSimpleInteger &rhs) |
Assignment operator. More... | |
virtual | ~OsiSimpleInteger () |
Destructor. More... | |
virtual double | infeasibility (const OsiBranchingInformation *info, int &whichWay) const |
Infeasibility - large is 0.5. More... | |
virtual double | feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const |
Set bounds to fix the variable at the current (integer) value. More... | |
virtual OsiBranchingObject * | createBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const |
Creates a branching object. More... | |
void | setColumnNumber (int value) |
Set solver column number. More... | |
virtual int | columnNumber () const |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics. More... | |
double | originalLowerBound () const |
Original bounds. More... | |
void | setOriginalLowerBound (double value) |
double | originalUpperBound () const |
void | setOriginalUpperBound (double value) |
virtual void | resetBounds (const OsiSolverInterface *solver) |
Reset variable bounds to their original values. More... | |
virtual void | resetSequenceEtc (int numberColumns, const int *originalColumns) |
Change column numbers after preprocessing. More... | |
virtual double | upEstimate () const |
Return "up" estimate (default 1.0e-5) More... | |
virtual double | downEstimate () const |
Return "down" estimate (default 1.0e-5) More... | |
virtual bool | canHandleShadowPrices () const |
Return true if knows how to deal with Pseudo Shadow Prices. More... | |
double | infeasibility (const OsiSolverInterface *solver, int &whichWay) const |
Infeasibility of the object. More... | |
virtual double | infeasibility (const OsiBranchingInformation *info, int &whichWay) const=0 |
double | infeasibility () const |
Return infeasibility. More... | |
virtual double | feasibleRegion (OsiSolverInterface *solver) const |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. More... | |
virtual double | feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const=0 |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. More... | |
![]() | |
OsiObject2 () | |
Default Constructor. More... | |
OsiObject2 (const OsiObject2 &) | |
Copy constructor. More... | |
OsiObject2 & | operator= (const OsiObject2 &rhs) |
Assignment operator. More... | |
virtual | ~OsiObject2 () |
Destructor. More... | |
void | setPreferredWay (int value) |
Set preferred way of branching - -1 off, 0 down, 1 up (for 2-way) More... | |
virtual int | preferredWay () const |
Get preferred way of branching - -1 off, 0 down, 1 up (for 2-way) More... | |
![]() | |
OsiObject () | |
Default Constructor. More... | |
OsiObject (const OsiObject &) | |
Copy constructor. More... | |
OsiObject & | operator= (const OsiObject &rhs) |
Assignment operator. More... | |
virtual | ~OsiObject () |
Destructor. More... | |
double | infeasibility (const OsiSolverInterface *solver, int &whichWay) const |
Infeasibility of the object. More... | |
virtual double | checkInfeasibility (const OsiBranchingInformation *info) const |
virtual double | feasibleRegion (OsiSolverInterface *solver) const |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. More... | |
virtual bool | canDoHeuristics () const |
Return true if object can take part in normal heuristics. More... | |
virtual bool | canMoveToNearest () const |
Return true if object can take part in move to nearest heuristic. More... | |
int | priority () const |
Return Priority - note 1 is highest priority. More... | |
void | setPriority (int priority) |
Set priority. More... | |
virtual bool | boundBranch () const |
Return true if branch should only bound variables. More... | |
int | numberWays () const |
Return maximum number of ways branch may have. More... | |
void | setNumberWays (int numberWays) |
Set maximum number of ways branch may have. More... | |
void | setWhichWay (int way) |
Return preferred way to branch. More... | |
int | whichWay () const |
Return current preferred way to branch. More... | |
double | infeasibility () const |
Return infeasibility. More... | |
virtual void | updateBefore (const OsiObject *) |
Updates stuff like pseudocosts before threads. More... | |
virtual void | updateAfter (const OsiObject *, const OsiObject *) |
Updates stuff like pseudocosts after threads finished. More... | |
Protected Attributes | |
double | originalLower_ |
data Original lower bound More... | |
double | originalUpper_ |
Original upper bound. More... | |
int | columnNumber_ |
Column number in solver. More... | |
![]() | |
int | preferredWay_ |
Preferred way of branching - -1 off, 0 down, 1 up (for 2-way) More... | |
double | otherInfeasibility_ |
"Infeasibility" on other way More... | |
![]() | |
double | infeasibility_ |
data More... | |
short | whichWay_ |
Computed preferred way to branch. More... | |
short | numberWays_ |
Maximum number of ways on branch. More... | |
int | priority_ |
Priority. More... | |
Define a single integer class.
Definition at line 558 of file OsiBranchingObject.hpp.
OsiSimpleInteger::OsiSimpleInteger | ( | ) |
Default Constructor.
OsiSimpleInteger::OsiSimpleInteger | ( | const OsiSolverInterface * | solver, |
int | iColumn | ||
) |
Useful constructor - passed solver index.
OsiSimpleInteger::OsiSimpleInteger | ( | int | iColumn, |
double | lower, | ||
double | upper | ||
) |
Useful constructor - passed solver index and original bounds.
OsiSimpleInteger::OsiSimpleInteger | ( | const OsiSimpleInteger & | ) |
Copy constructor.
|
virtual |
Destructor.
OsiSimpleInteger& OsiSimpleInteger::operator= | ( | const OsiSimpleInteger & | rhs | ) |
Assignment operator.
|
virtual |
Infeasibility - large is 0.5.
Implements OsiObject.
|
virtual |
Set bounds to fix the variable at the current (integer) value.
Given an integer value, set the lower and upper bounds to fix the variable. Returns amount it had to move variable.
Implements OsiObject.
|
virtual |
Creates a branching object.
The preferred direction is set by way
, 0 for down, 1 for up.
Reimplemented from OsiObject.
|
inline |
Set solver column number.
Definition at line 601 of file OsiBranchingObject.hpp.
|
virtual |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.
Reimplemented from OsiObject.
|
inline |
Original bounds.
Definition at line 613 of file OsiBranchingObject.hpp.
|
inline |
Definition at line 617 of file OsiBranchingObject.hpp.
|
inline |
Definition at line 621 of file OsiBranchingObject.hpp.
|
inline |
Definition at line 625 of file OsiBranchingObject.hpp.
|
virtual |
Reset variable bounds to their original values.
Bounds may be tightened, so it may be good to be able to reset them to their original values.
Reimplemented from OsiObject.
|
virtual |
Change column numbers after preprocessing.
Reimplemented from OsiObject.
|
virtual |
Return "up" estimate (default 1.0e-5)
Reimplemented from OsiObject.
|
virtual |
Return "down" estimate (default 1.0e-5)
Reimplemented from OsiObject.
|
inlinevirtual |
Return true if knows how to deal with Pseudo Shadow Prices.
Reimplemented from OsiObject.
Definition at line 643 of file OsiBranchingObject.hpp.
double OsiObject::infeasibility |
Infeasibility of the object.
This is some measure of the infeasibility of the object. 0.0 indicates that the object is satisfied.
The preferred branching direction is returned in whichWay, where for normal two-way branching 0 is down, 1 is up
This is used to prepare for strong branching but should also think of case when no strong branching
The object may also compute an estimate of cost of going "up" or "down". This will probably be based on pseudo-cost ideas
This should also set mutable infeasibility_ and whichWay_ This is for instant re-use for speed
Default for this just calls infeasibility with OsiBranchingInformation NOTE - Convention says that an infeasibility of COIN_DBL_MAX means object has worked out it can't be satisfied!
virtual double OsiObject::infeasibility |
|
inline |
Return infeasibility.
Definition at line 195 of file OsiBranchingObject.hpp.
virtual double OsiObject::feasibleRegion |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
Returns measure of how much it had to move solution to make feasible
virtual double OsiObject::feasibleRegion |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
Returns measure of how much it had to move solution to make feasible Faster version
|
protected |
data Original lower bound
Definition at line 651 of file OsiBranchingObject.hpp.
|
protected |
Original upper bound.
Definition at line 653 of file OsiBranchingObject.hpp.
|
protected |
Column number in solver.
Definition at line 655 of file OsiBranchingObject.hpp.