# CbcLotsize Class Reference

Lotsize class. More...

`#include <CbcBranchLotsize.hpp>`

Inheritance diagram for CbcLotsize:
[legend]
Collaboration diagram for CbcLotsize:
[legend]

List of all members.

## 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.
CbcLotsize & | operator= (const CbcLotsize &rhs)
| ~CbcLotsize ()
virtual double | infeasibility (const OsiBranchingInformation *info, int &preferredWay) const
| Infeasibility - large is 0.5.
virtual void | feasibleRegion ()
| Set bounds to contain the current solution.
virtual CbcBranchingObject * | createCbcBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
| Creates a branching object.
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 (const OsiSolverInterface *solver)
| Reset original upper and lower bound values from the solver.
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].
virtual void | floorCeiling (double &floorLotsize, double &ceilingLotsize, double value, double tolerance) const
| Returns floor and ceiling.
int | modelSequence () const
| Model column number.
void | setModelSequence (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 variable bounds.
double | originalUpperBound () const
int | rangeType () const
| Type - 1 points, 2 ranges.
int | numberRanges () const
| Number of points.
double * | bound () const
| Ranges.
virtual bool | canDoHeuristics () const
| Return true if object can take part in normal heuristics.
## Private Member Functions
void | printLotsize (double value, bool condition, int type) const
| Just for debug (CBC_PRINT defined in CbcBranchLotsize.cpp).
## Private Attributes
int | columnNumber_
| data
int | rangeType_
| Type - 1 points, 2 ranges.
int | numberRanges_
| Number of points.
double | largestGap_
double * | bound_
| Ranges.
int | range_
| Current range.

## Detailed Description

Lotsize class.

Definition at line 13 of file CbcBranchLotsize.hpp.

## Constructor & Destructor Documentation

CbcLotsize::CbcLotsize | ( |  | ) |

CbcLotsize::CbcLotsize | ( | CbcModel * | model,
|  | int | iColumn,
|  | int | numberPoints,
|  | const double * | points,
|  | bool | range = `false` |
| ) |  |  |

CbcLotsize::CbcLotsize | ( | const CbcLotsize & |  | ) |

CbcLotsize::~CbcLotsize | ( |  | ) |

## Member Function Documentation

virtual CbcObject* CbcLotsize::clone | ( |  | ) | const`[virtual]`

Clone.

Implements CbcObject.

CbcLotsize& CbcLotsize::operator= | ( | const CbcLotsize & | rhs | ) |

Reimplemented from CbcObject.

virtual double CbcLotsize::infeasibility | ( | const OsiBranchingInformation * | info,
|  | int & | preferredWay |
| ) |  |  | const`[virtual]`

Infeasibility - large is 0.5.

Reimplemented from CbcObject.

virtual void CbcLotsize::feasibleRegion | ( |  | ) | `[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 CbcBranchingObject* CbcLotsize::createCbcBranch | ( | OsiSolverInterface * | solver,
|  | const OsiBranchingInformation * | info,
|  | int | way |
| ) |  |  | `[virtual]`

Creates a branching object.

Reimplemented from CbcObject.

virtual CbcBranchingObject* CbcLotsize::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 +/-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 CbcBranchingObject* CbcLotsize::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 CbcLotsize::resetBounds | ( | const OsiSolverInterface * | solver | ) | `[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 void CbcLotsize::floorCeiling | ( | double & | floorLotsize,
|  | double & | ceilingLotsize,
|  | double | value,
|  | double | tolerance |
| ) |  |  | const`[virtual]`

Returns floor and ceiling.

Reimplemented from CbcObject.

int CbcLotsize::modelSequence | ( |  | ) | const`[inline]`

Model column number.

Definition at line 97 of file CbcBranchLotsize.hpp.

void CbcLotsize::setModelSequence | ( | int | value | ) | `[inline]`

Set model column number.

Definition at line 101 of file CbcBranchLotsize.hpp.

virtual int CbcLotsize::columnNumber | ( |  | ) | const`[virtual]`

Column number if single column object -1 otherwise, so returns >= 0 Used by heuristics.

Reimplemented from OsiObject.

double CbcLotsize::originalLowerBound | ( |  | ) | const`[inline]`

Original variable bounds.

Definition at line 111 of file CbcBranchLotsize.hpp.

double CbcLotsize::originalUpperBound | ( |  | ) | const`[inline]`

Definition at line 114 of file CbcBranchLotsize.hpp.

int CbcLotsize::rangeType | ( |  | ) | const`[inline]`

Type - 1 points, 2 ranges.

Definition at line 118 of file CbcBranchLotsize.hpp.

int CbcLotsize::numberRanges | ( |  | ) | const`[inline]`

Number of points.

Definition at line 122 of file CbcBranchLotsize.hpp.

double* CbcLotsize::bound | ( |  | ) | const`[inline]`

Ranges.

Definition at line 126 of file CbcBranchLotsize.hpp.

virtual bool CbcLotsize::canDoHeuristics | ( |  | ) | const`[inline, virtual]`

Return true if object can take part in normal heuristics.

Reimplemented from OsiObject.

Definition at line 131 of file CbcBranchLotsize.hpp.

void CbcLotsize::printLotsize | ( | double | value,
|  | bool | condition,
|  | int | type |
| ) |  |  | const`[private]`

Just for debug (CBC_PRINT defined in CbcBranchLotsize.cpp).

## Member Data Documentation

int CbcLotsize::columnNumber_`[private]`

data

Column number in model

Definition at line 143 of file CbcBranchLotsize.hpp.

int CbcLotsize::rangeType_`[private]`

Type - 1 points, 2 ranges.

Definition at line 145 of file CbcBranchLotsize.hpp.

int CbcLotsize::numberRanges_`[private]`

Number of points.

Definition at line 147 of file CbcBranchLotsize.hpp.

double CbcLotsize::largestGap_`[private]`

Definition at line 149 of file CbcBranchLotsize.hpp.

double* CbcLotsize::bound_`[private]`

Ranges.

Definition at line 151 of file CbcBranchLotsize.hpp.

int CbcLotsize::range_`[mutable, private]`

Current range.

Definition at line 153 of file CbcBranchLotsize.hpp.

The documentation for this class was generated from the following file:

- /home/coin/svn-release/Cbc-2.8.0/Cbc/src/CbcBranchLotsize.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines