Cbc 2.10.13
Loading...
Searching...
No Matches
CbcLotsizeBranchingObject Class Reference

Lotsize branching object. More...

#include <CbcBranchLotsize.hpp>

Inheritance diagram for CbcLotsizeBranchingObject:
Collaboration diagram for CbcLotsizeBranchingObject:

Public Member Functions

 CbcLotsizeBranchingObject ()
 Default constructor.
 CbcLotsizeBranchingObject (CbcModel *model, int variable, int way, double value, const CbcLotsize *lotsize)
 Create a lotsize floor/ceiling branch object.
virtual double branch ()
 Create a degenerate branch object.
virtual void print ()
 Print something about branch - only if log level high.
virtual CbcBranchObjType type () const
 Return the type (an integer identifier) of this.
virtual CbcRangeCompare compareBranchingObject (const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
 Compare the this with brObj.
virtual void print () const
 Print something about branch - only if log level high.
Public Member Functions inherited from CbcBranchingObject
 CbcBranchingObject ()
 Default Constructor.
 CbcBranchingObject (CbcModel *model, int variable, int way, double value)
 Constructor.
 CbcBranchingObject (const CbcBranchingObject &)
 Copy constructor.
CbcBranchingObjectoperator= (const CbcBranchingObject &rhs)
 Assignment operator.
virtual CbcBranchingObjectclone () const =0
 Clone.
virtual ~CbcBranchingObject ()
 Destructor.
virtual int fillStrongInfo (CbcStrongInfo &)
 Some branchingObjects may claim to be able to skip strong branching.
void resetNumberBranchesLeft ()
 Reset number of branches left to original.
void setNumberBranches (int value)
 Set number of branches to do.
virtual double branch (OsiSolverInterface *)
 Execute the actions required to branch, as specified by the current state of the branching object, and advance the object's state.
virtual void fix (OsiSolverInterface *, double *, double *, int) const
 Update bounds in solver as in 'branch' and update given bounds.
virtual bool tighten (OsiSolverInterface *)
 Change (tighten) bounds in object to reflect bounds in solver.
virtual void previousBranch ()
 Reset every information so that the branching object appears to point to the previous child.
int variable () const
 Index identifying the associated CbcObject within its class.
int way () const
 Get the state of the branching object.
void way (int way)
 Set the state of the branching object.
void setModel (CbcModel *model)
 update model
CbcModelmodel () const
 Return model.
CbcObject * object () const
 Return pointer back to object which created.
void setOriginalObject (CbcObject *object)
 Set pointer back to object which created.
virtual int compareOriginalObject (const CbcBranchingObject *brObj) const
 Compare the original object of this with the original object of brObj.

Protected Member Functions

*Lower[0] and upper[1] bounds for the down arm (way_=-1) double down_[2]
*Lower[0] and upper[1] bounds for the up arm (way_=1) double up_[2]

Additional Inherited Members

Protected Attributes inherited from CbcBranchingObject
CbcModelmodel_
 The model that owns this branching object.
CbcObject * originalCbcObject_
 Pointer back to object which created.
int variable_
 Branching variable (0 is first integer).
int way_
 The state of the branching object.

Detailed Description

Lotsize branching object.

This object can specify a two-way branch on an integer variable. For each arm of the branch, the upper and lower bounds on the variable can be independently specified.

Variable_ holds the index of the integer variable in the integerVariable_ array of the model.

Definition at line 172 of file CbcBranchLotsize.hpp.

Constructor & Destructor Documentation

◆ CbcLotsizeBranchingObject() [1/2]

CbcLotsizeBranchingObject::CbcLotsizeBranchingObject ( )

Default constructor.

◆ CbcLotsizeBranchingObject() [2/2]

CbcLotsizeBranchingObject::CbcLotsizeBranchingObject ( CbcModel * model,
int variable,
int way,
double value,
const CbcLotsize * lotsize )

Create a lotsize floor/ceiling branch object.

Specifies a simple two-way branch. Let value = x*. One arm of the branch will be is lb <= x <= valid range below(x*), the other valid range above(x*) <= x <= ub. Specify way = -1 to set the object state to perform the down arm first, way = 1 for the up arm.

Member Function Documentation

◆ branch()

virtual double CbcLotsizeBranchingObject::branch ( )
virtual

Create a degenerate branch object.

Specifies a `one-way branch'. Calling branch() for this object will always result in lowerValue <= x <= upperValue. Used to fix in valid range */

CbcLotsizeBranchingObject(CbcModel *model, int variable, int way, double lowerValue, double upperValue);

Copy constructor CbcLotsizeBranchingObject(const CbcLotsizeBranchingObject &);

Assignment operator CbcLotsizeBranchingObject &operator=(const CbcLotsizeBranchingObject &rhs);

Clone virtual CbcBranchingObject *clone() const;

Destructor virtual ~CbcLotsizeBranchingObject();

using CbcBranchingObject::branch; /** Sets the bounds for the variable according to the current arm of the branch and advances the object state to the next arm.

Implements CbcBranchingObject.

◆ print() [1/2]

virtual void CbcLotsizeBranchingObject::print ( )
virtual

Print something about branch - only if log level high.

◆ type()

virtual CbcBranchObjType CbcLotsizeBranchingObject::type ( ) const
inlinevirtual

Return the type (an integer identifier) of this.

Implements CbcBranchingObject.

Definition at line 221 of file CbcBranchLotsize.hpp.

◆ compareBranchingObject()

virtual CbcRangeCompare CbcLotsizeBranchingObject::compareBranchingObject ( const CbcBranchingObject * brObj,
const bool replaceIfOverlap = false )
virtual

Compare the this with brObj.

this and brObj must be os the same type and must have the same original object, but they may have different feasible regions. Return the appropriate CbcRangeCompare value (first argument being the sub/superset if that's the case). In case of overlap (and if replaceIfOverlap is true) replace the current branching object with one whose feasible region is the overlap.

Implements CbcBranchingObject.

◆ arm() [1/2]

*Lower[0] and upper[1] bounds for the down CbcLotsizeBranchingObject::arm ( way_ = -1)
protected

◆ arm() [2/2]

*Lower[0] and upper[1] bounds for the up CbcLotsizeBranchingObject::arm ( way_ = 1)
protected

◆ print() [2/2]

virtual void CbcBranchingObject::print ( ) const
inlinevirtual

Print something about branch - only if log level high.

Reimplemented from CbcBranchingObject.

Definition at line 132 of file CbcBranchingObject.hpp.


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