#include <CbcBranchActual.hpp>
Inheritance diagram for CbcSimpleInteger:
Public Member Functions | |
CbcSimpleInteger () | |
CbcSimpleInteger (CbcModel *model, int sequence, int iColumn, double breakEven=0.5) | |
CbcSimpleInteger (const CbcSimpleInteger &) | |
virtual CbcObject * | clone () const |
Clone. | |
CbcSimpleInteger & | operator= (const CbcSimpleInteger &rhs) |
~CbcSimpleInteger () | |
virtual double | infeasibility (int &preferredWay) const |
Infeasibility - large is 0.5. | |
virtual void | feasibleRegion () |
Set bounds to fix the variable at the current (integer) value. | |
virtual CbcBranchingObject * | createBranch (int way) |
Creates a branching object. | |
virtual OsiSolverBranch * | solverBranch () const |
Create an OsiSolverBranch object. | |
virtual void | redoSequenceEtc (CbcModel *model, int numberColumns, const int *originalColumns) |
Redoes data when sequence numbers change. | |
virtual CbcBranchingObject * | preferredNewFeasible () const |
Given a valid solution (with reduced costs, etc. | |
virtual CbcBranchingObject * | notPreferredNewFeasible () const |
Given a valid solution (with reduced costs, etc. | |
virtual void | resetBounds () |
Reset original upper and lower bound values from the solver. | |
int | sequence () const |
Sequence number. | |
int | modelSequence () const |
Model column number. | |
void | setColumnNumber (int value) |
Set model column number. | |
virtual int | columnNumber () const |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics. | |
double | originalLowerBound () const |
Original bounds. | |
void | setOriginalLowerBound (double value) |
double | originalUpperBound () const |
void | setOriginalUpperBound (double value) |
double | breakEven () const |
Breakeven e.g 0.7 -> >= 0.7 go up first. | |
void | setBreakEven (double value) |
Set breakeven e.g 0.7 -> >= 0.7 go up first. | |
Protected Attributes | |
int | sequence_ |
Sequence. | |
int | columnNumber_ |
Column number in model. | |
double | originalLower_ |
Original lower bound. | |
double | originalUpper_ |
Original upper bound. | |
double | breakEven_ |
Breakeven i.e. >= this preferred is up. |
Definition at line 173 of file CbcBranchActual.hpp.
CbcSimpleInteger::CbcSimpleInteger | ( | ) |
CbcSimpleInteger::CbcSimpleInteger | ( | CbcModel * | model, | |
int | sequence, | |||
int | iColumn, | |||
double | breakEven = 0.5 | |||
) |
CbcSimpleInteger::CbcSimpleInteger | ( | const CbcSimpleInteger & | ) |
CbcSimpleInteger::~CbcSimpleInteger | ( | ) |
virtual CbcObject* CbcSimpleInteger::clone | ( | ) | const [virtual] |
Clone.
Implements CbcObject.
Reimplemented in CbcSimpleIntegerPseudoCost, and CbcSimpleIntegerDynamicPseudoCost.
CbcSimpleInteger& CbcSimpleInteger::operator= | ( | const CbcSimpleInteger & | rhs | ) |
virtual double CbcSimpleInteger::infeasibility | ( | int & | preferredWay | ) | const [virtual] |
Infeasibility - large is 0.5.
Implements CbcObject.
Reimplemented in CbcSimpleIntegerPseudoCost, and CbcSimpleIntegerDynamicPseudoCost.
virtual void CbcSimpleInteger::feasibleRegion | ( | ) | [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. The algorithm takes a bit of care in order to compensate for minor numerical inaccuracy.
Implements CbcObject.
virtual CbcBranchingObject* CbcSimpleInteger::createBranch | ( | int | way | ) | [virtual] |
Creates a branching object.
The preferred direction is set by way
, -1 for down, +1 for up.
Implements CbcObject.
Reimplemented in CbcSimpleIntegerPseudoCost, and CbcSimpleIntegerDynamicPseudoCost.
virtual OsiSolverBranch* CbcSimpleInteger::solverBranch | ( | ) | const [virtual] |
Create an OsiSolverBranch object.
This returns NULL if branch not represented by bound changes
Reimplemented from CbcObject.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost.
virtual void CbcSimpleInteger::redoSequenceEtc | ( | CbcModel * | model, | |
int | numberColumns, | |||
const int * | originalColumns | |||
) | [virtual] |
virtual CbcBranchingObject* CbcSimpleInteger::preferredNewFeasible | ( | ) | const [virtual] |
Given a valid solution (with reduced costs, etc.
), return a branching object which would give a new feasible point in the good direction.
The preferred branching object will force the variable to be either the floor or ceiling of its current value, depending on the reduced cost and objective sense. If movement in the direction which improves the objective is impossible due to bounds on the variable, the branching object will move in the other direction. If no movement is possible, the method returns NULL.
Only the bounds on this variable are considered when determining if the new point is feasible.
Reimplemented from CbcObject.
virtual CbcBranchingObject* CbcSimpleInteger::notPreferredNewFeasible | ( | ) | const [virtual] |
Given a valid solution (with reduced costs, etc.
), return a branching object which would give a new feasible point in a bad direction.
As for preferredNewFeasible(), but the preferred branching object will force movement in a direction that degrades the objective.
Reimplemented from CbcObject.
virtual void CbcSimpleInteger::resetBounds | ( | ) | [virtual] |
Reset original upper and lower bound values from the solver.
Handy for updating bounds held in this object after bounds held in the solver have been tightened.
Reimplemented from CbcObject.
int CbcSimpleInteger::sequence | ( | ) | const [inline] |
int CbcSimpleInteger::modelSequence | ( | ) | const [inline] |
void CbcSimpleInteger::setColumnNumber | ( | int | value | ) | [inline] |
Set model column number.
Definition at line 260 of file CbcBranchActual.hpp.
References columnNumber_.
virtual int CbcSimpleInteger::columnNumber | ( | ) | const [virtual] |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.
Reimplemented from CbcObject.
double CbcSimpleInteger::originalLowerBound | ( | ) | const [inline] |
void CbcSimpleInteger::setOriginalLowerBound | ( | double | value | ) | [inline] |
double CbcSimpleInteger::originalUpperBound | ( | ) | const [inline] |
void CbcSimpleInteger::setOriginalUpperBound | ( | double | value | ) | [inline] |
double CbcSimpleInteger::breakEven | ( | ) | const [inline] |
Breakeven e.g 0.7 -> >= 0.7 go up first.
Definition at line 279 of file CbcBranchActual.hpp.
References breakEven_.
void CbcSimpleInteger::setBreakEven | ( | double | value | ) | [inline] |
int CbcSimpleInteger::sequence_ [protected] |
int CbcSimpleInteger::columnNumber_ [protected] |
Column number in model.
Definition at line 292 of file CbcBranchActual.hpp.
Referenced by modelSequence(), and setColumnNumber().
double CbcSimpleInteger::originalLower_ [protected] |
Original lower bound.
Definition at line 294 of file CbcBranchActual.hpp.
Referenced by originalLowerBound(), and setOriginalLowerBound().
double CbcSimpleInteger::originalUpper_ [protected] |
Original upper bound.
Definition at line 296 of file CbcBranchActual.hpp.
Referenced by originalUpperBound(), and setOriginalUpperBound().
double CbcSimpleInteger::breakEven_ [protected] |
Breakeven i.e. >= this preferred is up.
Definition at line 298 of file CbcBranchActual.hpp.
Referenced by breakEven().