Cbc 2.10.12
|
Define a single integer class. More...
#include <CbcSimpleInteger.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) |
virtual | ~CbcSimpleInteger () |
OsiSimpleInteger * | osiObject () const |
Construct an OsiSimpleInteger object. | |
virtual double | infeasibility (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 * | createCbcBranch (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 void | feasibleRegion () |
Set bounds to fix the variable at the current (integer) value. | |
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. | |
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. | |
virtual OsiSolverBranch * | solverBranch () const |
Create an OsiSolverBranch object. | |
Public Member Functions inherited from CbcObject | |
CbcObject () | |
CbcObject (CbcModel *model) | |
CbcObject (const CbcObject &) | |
CbcObject & | operator= (const CbcObject &rhs) |
virtual | ~CbcObject () |
Destructor. | |
virtual double | infeasibility (int &) const |
virtual OsiBranchingObject * | createBranch (OsiSolverInterface *, const OsiBranchingInformation *, int) const |
virtual OsiBranchingObject * | createOsiBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const |
Create an Osibranching object and indicate which way to branch first. | |
virtual CbcBranchingObject * | preferredNewFeasible () const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a good direction. | |
virtual CbcBranchingObject * | notPreferredNewFeasible () const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a bad direction. | |
virtual void | floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const |
Returns floor and ceiling i.e. | |
virtual CbcObjectUpdateData | createUpdateInformation (const OsiSolverInterface *solver, const CbcNode *node, const CbcBranchingObject *branchingObject) |
Pass in information on branch just done and create CbcObjectUpdateData instance. | |
virtual void | updateInformation (const CbcObjectUpdateData &) |
Update object by CbcObjectUpdateData. | |
int | id () const |
Identifier (normally column number in matrix) | |
void | setId (int value) |
Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e. | |
bool | optionalObject () const |
Return true if optional branching object i.e. | |
int | position () const |
Get position in object_ list. | |
void | setPosition (int position) |
Set position in object_ list. | |
void | setModel (CbcModel *model) |
update model | |
CbcModel * | model () const |
Return model. | |
int | preferredWay () const |
If -1 down always chosen first, +1 up always, 0 normal. | |
void | setPreferredWay (int value) |
Set -1 down always chosen first, +1 up always, 0 normal. | |
virtual void | redoSequenceEtc (CbcModel *, int, const int *) |
Redoes data when sequence numbers change. | |
virtual void | initializeForBranching (CbcModel *) |
Initialize for branching. |
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. | |
Protected Attributes inherited from CbcObject | |
CbcModel * | model_ |
data | |
int | id_ |
Identifier (normally column number in matrix) | |
int | position_ |
Position in object list. | |
int | preferredWay_ |
If -1 down always chosen first, +1 up always, 0 normal. |
Define a single integer class.
Definition at line 173 of file CbcSimpleInteger.hpp.
CbcSimpleInteger::CbcSimpleInteger | ( | ) |
CbcSimpleInteger::CbcSimpleInteger | ( | CbcModel * | model, |
int | iColumn, | ||
double | breakEven = 0.5 ) |
CbcSimpleInteger::CbcSimpleInteger | ( | CbcModel * | model, |
const OsiSimpleInteger * | object ) |
CbcSimpleInteger::CbcSimpleInteger | ( | const CbcSimpleInteger & | ) |
|
virtual |
|
virtual |
Clone.
Implements CbcObject.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost, CbcSimpleIntegerFixed, and CbcSimpleIntegerPseudoCost.
CbcSimpleInteger & CbcSimpleInteger::operator= | ( | const CbcSimpleInteger & | rhs | ) |
OsiSimpleInteger * CbcSimpleInteger::osiObject | ( | ) | const |
Construct an OsiSimpleInteger object.
|
virtual |
Infeasibility - large is 0.5.
Reimplemented from CbcObject.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost, and CbcSimpleIntegerPseudoCost.
|
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 |
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 from CbcObject.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost, and CbcSimpleIntegerPseudoCost.
void CbcSimpleInteger::fillCreateBranch | ( | CbcIntegerBranchingObject * | branching, |
const OsiBranchingInformation * | info, | ||
int | way ) |
Fills in a created branching object.
|
virtual |
Create an OsiSolverBranch object.
This returns NULL if branch not represented by bound changes
Reimplemented in CbcSimpleIntegerDynamicPseudoCost.
|
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 |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.
|
inline |
Set column number.
Definition at line 240 of file CbcSimpleInteger.hpp.
|
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 |
Change column numbers after preprocessing.
|
inline |
Original bounds.
Definition at line 255 of file CbcSimpleInteger.hpp.
|
inline |
Definition at line 259 of file CbcSimpleInteger.hpp.
|
inline |
Definition at line 263 of file CbcSimpleInteger.hpp.
|
inline |
Definition at line 267 of file CbcSimpleInteger.hpp.
|
inline |
Breakeven e.g 0.7 -> >= 0.7 go up first.
Definition at line 272 of file CbcSimpleInteger.hpp.
|
inline |
Set breakeven e.g 0.7 -> >= 0.7 go up first.
Definition at line 277 of file CbcSimpleInteger.hpp.
|
virtual |
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
Reimplemented from CbcObject.
|
virtual |
Create an OsiSolverBranch object.
This returns NULL if branch not represented by bound changes
Reimplemented from CbcObject.
Reimplemented in CbcSimpleIntegerDynamicPseudoCost.
|
protected |
|
protected |
Original upper bound.
Definition at line 288 of file CbcSimpleInteger.hpp.
|
protected |
Breakeven i.e. >= this preferred is up.
Definition at line 290 of file CbcSimpleInteger.hpp.
|
protected |
Column number in model.
Definition at line 292 of file CbcSimpleInteger.hpp.
|
protected |
If -1 down always chosen first, +1 up always, 0 normal.
Definition at line 294 of file CbcSimpleInteger.hpp.