Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CbcLotsize Class Reference

Lotsize class. More...

#include <CbcBranchLotsize.hpp>

+ Inheritance diagram for CbcLotsize:
+ Collaboration diagram for CbcLotsize:

Public Member Functions

 CbcLotsize ()
 
 CbcLotsize (CbcModel *model, int iColumn, int numberPoints, const double *points, bool range=false)
 
 CbcLotsize (const CbcLotsize &)
 
virtual CbcObjectclone () const
 Clone. More...
 
CbcLotsizeoperator= (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 CbcBranchingObjectcreateCbcBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
 Creates a branching object. More...
 
virtual CbcBranchingObjectpreferredNewFeasible () 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 CbcBranchingObjectnotPreferredNewFeasible () 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...
 
- Public Member Functions inherited from CbcObject
 CbcObject ()
 
 CbcObject (CbcModel *model)
 
 CbcObject (const CbcObject &)
 
CbcObjectoperator= (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 OsiBranchingObjectcreateBranch (OsiSolverInterface *, const OsiBranchingInformation *, int) const
 Create a branching object and indicate which way to branch first. More...
 
virtual OsiBranchingObjectcreateOsiBranch (OsiSolverInterface *solver, const OsiBranchingInformation *info, int way) const
 Create an Osibranching object and indicate which way to branch first. More...
 
virtual OsiSolverBranchsolverBranch () 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...
 
CbcModelmodel () 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...
 
- Public Member Functions inherited from OsiObject
 OsiObject ()
 Default Constructor. More...
 
 OsiObject (const OsiObject &)
 Copy constructor. More...
 
OsiObjectoperator= (const OsiObject &rhs)
 Assignment operator. More...
 
virtual ~OsiObject ()
 Destructor. More...
 
double infeasibility (const OsiSolverInterface *solver, int &whichWay) const
 Infeasibility of the object. More...
 
virtual double checkInfeasibility (const OsiBranchingInformation *info) const
 
virtual bool canMoveToNearest () const
 Return true if object can take part in move to nearest heuristic. More...
 
int priority () const
 Return Priority - note 1 is highest priority. More...
 
void setPriority (int priority)
 Set priority. More...
 
virtual bool boundBranch () const
 Return true if branch should only bound variables. More...
 
virtual bool canHandleShadowPrices () const
 Return true if knows how to deal with Pseudo Shadow Prices. More...
 
int numberWays () const
 Return maximum number of ways branch may have. More...
 
void setNumberWays (int numberWays)
 Set maximum number of ways branch may have. More...
 
void setWhichWay (int way)
 Return preferred way to branch. More...
 
int whichWay () const
 Return current preferred way to branch. More...
 
double infeasibility () const
 Return infeasibility. More...
 
virtual double upEstimate () const
 Return "up" estimate (default 1.0e-5) More...
 
virtual double downEstimate () const
 Return "down" estimate (default 1.0e-5) More...
 
virtual void resetSequenceEtc (int, const int *)
 Change column numbers after preprocessing. More...
 
virtual void updateBefore (const OsiObject *)
 Updates stuff like pseudocosts before threads. More...
 
virtual void updateAfter (const OsiObject *, const OsiObject *)
 Updates stuff like pseudocosts after threads finished. More...
 

Private Member Functions

void printLotsize (double value, bool condition, int type) const
 Just for debug (CBC_PRINT defined in CbcBranchLotsize.cpp) More...
 

Private 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...
 

Additional Inherited Members

- Protected Attributes inherited from CbcObject
CbcModelmodel_
 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...
 
- Protected Attributes inherited from OsiObject
double infeasibility_
 data More...
 
short whichWay_
 Computed preferred way to branch. More...
 
short numberWays_
 Maximum number of ways on branch. More...
 
int priority_
 Priority. More...
 

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)
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
inlinevirtual

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_
mutableprivate

Current range.

Definition at line 153 of file CbcBranchLotsize.hpp.


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