Define a single integer class. More...
#include <CbcBranchActual.hpp>
Public Member Functions | |
CbcSimpleInteger () | |
CbcSimpleInteger (CbcModel *model, int iColumn, double breakEven=0.5) | |
CbcSimpleInteger (CbcModel *model, const OsiSimpleInteger *object) | |
CbcSimpleInteger (const CbcSimpleInteger &) | |
virtual CbcObject * | clone () const |
Clone. | |
CbcSimpleInteger & | operator= (const CbcSimpleInteger &rhs) |
Assignment operator. | |
~CbcSimpleInteger () | |
OsiSimpleInteger * | osiObject () const |
Construct an OsiSimpleInteger object. | |
virtual double | infeasibility (const OsiSolverInterface *solver, const OsiBranchingInformation *info, int &preferredWay) const |
Infeasibility - large is 0.5. | |
virtual double | feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const |
Set bounds to fix the variable at the current (integer) value. | |
virtual CbcBranchingObject * | createBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) |
Create a branching object and indicate which way to branch first. | |
void | fillCreateBranch (CbcIntegerBranchingObject *branching, const OsiBranchingInformation *info, int way) |
Fills in a created branching object. | |
virtual OsiSolverBranch * | solverBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info) const |
Create an OsiSolverBranch object. | |
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 int | columnNumber () const |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics. | |
void | setColumnNumber (int value) |
Set column number. | |
virtual void | resetBounds (const OsiSolverInterface *solver) |
Reset variable bounds to their original values. | |
virtual void | resetSequenceEtc (int numberColumns, const int *originalColumns) |
Change column numbers after preprocessing. | |
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 | |
double | originalLower_ |
data | |
double | originalUpper_ |
Original upper bound. | |
double | breakEven_ |
Breakeven i.e. >= this preferred is up. | |
int | columnNumber_ |
Column number in model. | |
int | preferredWay_ |
If -1 down always chosen first, +1 up always, 0 normal. |
Define a single integer class.
Definition at line 205 of file CbcBranchActual.hpp.
CbcSimpleInteger::CbcSimpleInteger | ( | ) |
CbcSimpleInteger::CbcSimpleInteger | ( | CbcModel * | model, | |
int | iColumn, | |||
double | breakEven = 0.5 | |||
) |
CbcSimpleInteger::CbcSimpleInteger | ( | CbcModel * | model, | |
const OsiSimpleInteger * | object | |||
) |
CbcSimpleInteger::CbcSimpleInteger | ( | const CbcSimpleInteger & | ) |
CbcSimpleInteger::~CbcSimpleInteger | ( | ) |
virtual CbcObject* CbcSimpleInteger::clone | ( | ) | const [virtual] |
Clone.
Implements CbcObject.
Reimplemented in CbcSimpleIntegerFixed, CbcSimpleIntegerPseudoCost, and CbcSimpleIntegerDynamicPseudoCost.
CbcSimpleInteger& CbcSimpleInteger::operator= | ( | const CbcSimpleInteger & | rhs | ) |
Assignment operator.
Reimplemented from CbcObject.
Reimplemented in CbcSimpleIntegerFixed, CbcSimpleIntegerPseudoCost, and CbcSimpleIntegerDynamicPseudoCost.
OsiSimpleInteger* CbcSimpleInteger::osiObject | ( | ) | const |
Construct an OsiSimpleInteger object.
virtual double CbcSimpleInteger::infeasibility | ( | const OsiSolverInterface * | solver, | |
const OsiBranchingInformation * | info, | |||
int & | preferredWay | |||
) | const [virtual] |
Infeasibility - large is 0.5.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost.
virtual double CbcSimpleInteger::feasibleRegion | ( | OsiSolverInterface * | solver, | |
const OsiBranchingInformation * | info | |||
) | const [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.
Reimplemented from CbcObject.
virtual CbcBranchingObject* CbcSimpleInteger::createBranch | ( | OsiSolverInterface * | solver, | |
const OsiBranchingInformation * | info, | |||
int | way | |||
) | [virtual] |
Create a branching object and indicate which way to branch first.
The branching object has to know how to create branches (fix variables, etc.)
Reimplemented in CbcSimpleIntegerFixed, and CbcSimpleIntegerDynamicPseudoCost.
void CbcSimpleInteger::fillCreateBranch | ( | CbcIntegerBranchingObject * | branching, | |
const OsiBranchingInformation * | info, | |||
int | way | |||
) |
Fills in a created branching object.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost.
virtual OsiSolverBranch* CbcSimpleInteger::solverBranch | ( | OsiSolverInterface * | solver, | |
const OsiBranchingInformation * | info | |||
) | const [virtual] |
Create an OsiSolverBranch object.
This returns NULL if branch not represented by bound changes
virtual double CbcSimpleInteger::infeasibility | ( | int & | preferredWay | ) | const [virtual] |
Infeasibility - large is 0.5.
Implements CbcObject.
Reimplemented in CbcSimpleIntegerFixed, 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 int CbcSimpleInteger::columnNumber | ( | ) | const [virtual] |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.
Reimplemented from OsiObject.
void CbcSimpleInteger::setColumnNumber | ( | int | value | ) | [inline] |
Set column number.
Definition at line 283 of file CbcBranchActual.hpp.
virtual void CbcSimpleInteger::resetBounds | ( | const OsiSolverInterface * | solver | ) | [virtual] |
Reset variable bounds to their original values.
Bounds may be tightened, so it may be good to be able to set this info in object.
Reimplemented from CbcObject.
virtual void CbcSimpleInteger::resetSequenceEtc | ( | int | numberColumns, | |
const int * | originalColumns | |||
) | [virtual] |
Change column numbers after preprocessing.
Reimplemented from OsiObject.
double CbcSimpleInteger::originalLowerBound | ( | ) | const [inline] |
Original bounds.
Definition at line 295 of file CbcBranchActual.hpp.
void CbcSimpleInteger::setOriginalLowerBound | ( | double | value | ) | [inline] |
Definition at line 297 of file CbcBranchActual.hpp.
double CbcSimpleInteger::originalUpperBound | ( | ) | const [inline] |
Definition at line 299 of file CbcBranchActual.hpp.
void CbcSimpleInteger::setOriginalUpperBound | ( | double | value | ) | [inline] |
Definition at line 301 of file CbcBranchActual.hpp.
double CbcSimpleInteger::breakEven | ( | ) | const [inline] |
Breakeven e.g 0.7 -> >= 0.7 go up first.
Definition at line 304 of file CbcBranchActual.hpp.
void CbcSimpleInteger::setBreakEven | ( | double | value | ) | [inline] |
Set breakeven e.g 0.7 -> >= 0.7 go up first.
Definition at line 307 of file CbcBranchActual.hpp.
double CbcSimpleInteger::originalLower_ [protected] |
double CbcSimpleInteger::originalUpper_ [protected] |
Original upper bound.
Definition at line 317 of file CbcBranchActual.hpp.
double CbcSimpleInteger::breakEven_ [protected] |
Breakeven i.e. >= this preferred is up.
Definition at line 319 of file CbcBranchActual.hpp.
int CbcSimpleInteger::columnNumber_ [protected] |
Column number in model.
Definition at line 321 of file CbcBranchActual.hpp.
int CbcSimpleInteger::preferredWay_ [protected] |
If -1 down always chosen first, +1 up always, 0 normal.
Reimplemented from CbcObject.
Definition at line 323 of file CbcBranchActual.hpp.