Cbc
2.10.10
|
Lotsize class. More...
#include <CbcBranchLotsize.hpp>
Public Member Functions | |
CbcLotsize () | |
CbcLotsize (CbcModel *model, int iColumn, int numberPoints, const double *points, bool range=false) | |
CbcLotsize (const CbcLotsize &) | |
virtual CbcObject * | clone () const |
Clone. More... | |
CbcLotsize & | operator= (const CbcLotsize &rhs) |
~CbcLotsize () | |
virtual double | infeasibility (const OsiBranchingInformation *info, int &preferredWay) const |
Infeasibility - large is 0.5. More... | |
virtual void | feasibleRegion () |
Set bounds to contain the current solution. More... | |
virtual CbcBranchingObject * | createCbcBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) |
Creates a branching object. More... | |
virtual CbcBranchingObject * | preferredNewFeasible () const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in the good direction. More... | |
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. More... | |
virtual void | resetBounds (const OsiSolverInterface *solver) |
Reset original upper and lower bound values from the solver. More... | |
bool | findRange (double value) const |
Finds range of interest so value is feasible in range range_ or infeasible between hi[range_] and lo[range_+1]. More... | |
virtual void | floorCeiling (double &floorLotsize, double &ceilingLotsize, double value, double tolerance) const |
Returns floor and ceiling. More... | |
int | modelSequence () const |
Model column number. More... | |
void | setModelSequence (int value) |
Set model 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 variable bounds. More... | |
double | originalUpperBound () const |
int | rangeType () const |
Type - 1 points, 2 ranges. More... | |
int | numberRanges () const |
Number of points. More... | |
double * | bound () const |
Ranges. More... | |
virtual bool | canDoHeuristics () const |
Return true if object can take part in normal heuristics. More... | |
virtual void | feasibleRegion ()=0 |
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 |
Dummy one for compatibility. 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... | |
![]() | |
CbcObject () | |
CbcObject (CbcModel *model) | |
CbcObject (const CbcObject &) | |
CbcObject & | operator= (const CbcObject &rhs) |
virtual | ~CbcObject () |
Destructor. More... | |
virtual double | infeasibility (int &) const |
virtual double | feasibleRegion (OsiSolverInterface *solver, const OsiBranchingInformation *info) const |
Dummy one for compatibility. 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 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. More... | |
virtual OsiSolverBranch * | solverBranch () const |
Create an OsiSolverBranch object. More... | |
virtual CbcObjectUpdateData | createUpdateInformation (const OsiSolverInterface *solver, const CbcNode *node, const CbcBranchingObject *branchingObject) |
Pass in information on branch just done and create CbcObjectUpdateData instance. More... | |
virtual void | updateInformation (const CbcObjectUpdateData &) |
Update object by CbcObjectUpdateData. More... | |
int | id () const |
Identifier (normally column number in matrix) More... | |
void | setId (int value) |
Set identifier (normally column number in matrix) but 1000000000 to 1100000000 means optional branching object i.e. More... | |
bool | optionalObject () const |
Return true if optional branching object i.e. More... | |
int | position () const |
Get position in object_ list. More... | |
void | setPosition (int position) |
Set position in object_ list. More... | |
void | setModel (CbcModel *model) |
update model More... | |
CbcModel * | model () const |
Return model. More... | |
int | preferredWay () const |
If -1 down always chosen first, +1 up always, 0 normal. More... | |
void | setPreferredWay (int value) |
Set -1 down always chosen first, +1 up always, 0 normal. More... | |
virtual void | redoSequenceEtc (CbcModel *, int, const int *) |
Redoes data when sequence numbers change. More... | |
virtual void | initializeForBranching (CbcModel *) |
Initialize for branching. More... | |
Protected Attributes | |
int | columnNumber_ |
data More... | |
int | rangeType_ |
Type - 1 points, 2 ranges. More... | |
int | numberRanges_ |
Number of points. More... | |
double | largestGap_ |
double * | bound_ |
Ranges. More... | |
int | range_ |
Current range. More... | |
![]() | |
CbcModel * | model_ |
data More... | |
int | id_ |
Identifier (normally column number in matrix) More... | |
int | position_ |
Position in object list. More... | |
int | preferredWay_ |
If -1 down always chosen first, +1 up always, 0 normal. More... | |
Private Member Functions | |
void | printLotsize (double value, bool condition, int type) const |
Just for debug (CBC_PRINT defined in CbcBranchLotsize.cpp) More... | |
Lotsize class.
Definition at line 12 of file CbcBranchLotsize.hpp.
CbcLotsize::CbcLotsize | ( | ) |
CbcLotsize::CbcLotsize | ( | CbcModel * | model, |
int | iColumn, | ||
int | numberPoints, | ||
const double * | points, | ||
bool | range = false |
||
) |
CbcLotsize::CbcLotsize | ( | const CbcLotsize & | ) |
CbcLotsize::~CbcLotsize | ( | ) |
CbcLotsize& CbcLotsize::operator= | ( | const CbcLotsize & | rhs | ) |
|
virtual |
Infeasibility - large is 0.5.
Reimplemented from CbcObject.
|
virtual |
Set bounds to contain the current solution.
More precisely, for the variable associated with this object, take the value given in the current solution, force it within the current bounds if required, then set the bounds to fix the variable at the integer nearest the solution value.
Implements CbcObject.
|
virtual |
Creates a branching object.
Reimplemented from CbcObject.
|
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 +/-1 from 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 |
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 |
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.
bool CbcLotsize::findRange | ( | double | value | ) | const |
Finds range of interest so value is feasible in range range_ or infeasible between hi[range_] and lo[range_+1].
Returns true if feasible.
|
virtual |
Returns floor and ceiling.
Reimplemented from CbcObject.
|
inline |
Model column number.
Definition at line 95 of file CbcBranchLotsize.hpp.
|
inline |
Set model column number.
Definition at line 100 of file CbcBranchLotsize.hpp.
|
virtual |
Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.
|
inline |
Original variable bounds.
Definition at line 111 of file CbcBranchLotsize.hpp.
|
inline |
Definition at line 115 of file CbcBranchLotsize.hpp.
|
inline |
Type - 1 points, 2 ranges.
Definition at line 120 of file CbcBranchLotsize.hpp.
|
inline |
Number of points.
Definition at line 125 of file CbcBranchLotsize.hpp.
|
inline |
Ranges.
Definition at line 130 of file CbcBranchLotsize.hpp.
|
inlinevirtual |
Return true if object can take part in normal heuristics.
Definition at line 136 of file CbcBranchLotsize.hpp.
|
private |
Just for debug (CBC_PRINT defined in CbcBranchLotsize.cpp)
virtual void CbcObject::feasibleRegion |
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution.
virtual double CbcObject::feasibleRegion |
Dummy one for compatibility.
virtual double CbcObject::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
|
protected |
|
protected |
Type - 1 points, 2 ranges.
Definition at line 151 of file CbcBranchLotsize.hpp.
|
protected |
Number of points.
Definition at line 153 of file CbcBranchLotsize.hpp.
|
protected |
Definition at line 155 of file CbcBranchLotsize.hpp.
|
protected |
Ranges.
Definition at line 157 of file CbcBranchLotsize.hpp.
|
mutableprotected |
Current range.
Definition at line 159 of file CbcBranchLotsize.hpp.