Blis  0.94
Public Member Functions | Protected Attributes | List of all members
BlisObjectInt Class Reference

#include <BlisObjectInt.h>

+ Inheritance diagram for BlisObjectInt:
+ Collaboration diagram for BlisObjectInt:

Public Member Functions

 BlisObjectInt ()
 Default Constructor. More...
 
 BlisObjectInt (int objectIndex, int iColumn, double lb, double ub, double breakEven=0.5)
 Useful constructor - passed integer index and model index. More...
 
virtual ~BlisObjectInt ()
 Destructor. More...
 
 BlisObjectInt (const BlisObjectInt &)
 Copy constructor. More...
 
virtual BcpsObjectclone () const
 Clone an object. More...
 
BlisObjectIntoperator= (const BlisObjectInt &rhs)
 Assignment operator. More...
 
virtual double infeasibility (BcpsModel *m, int &preferredWay) const
 Infeasibility. More...
 
virtual void feasibleRegion (BcpsModel *m)
 Set bounds to contain the current solution. More...
 
virtual BcpsBranchObjectcreateBranchObject (BcpsModel *m, int direction) const
 Creates a branching object. More...
 
virtual BcpsBranchObjectpreferredNewFeasible (BcpsModel *m) 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 BcpsBranchObjectnotPreferredNewFeasible (BcpsModel *m) 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 (BcpsModel *m)
 Reset original upper and lower bound values from the solver. More...
 
virtual int columnIndex () const
 Column number if single column object, otherwise. More...
 
double breakEven () const
 Breakeven e.g 0.7 -> >= 0.7 go up first. More...
 
void setBreakEven (double value)
 Set breakeven e.g 0.7 -> >= 0.7 go up first. More...
 
BlisPseudocostpseudocost ()
 Access pseudocost. More...
 
Get or set Original bounds.
double originalLowerBound () const
 
void setOriginalLowerBound (double value)
 
double originalUpperBound () const
 
void setOriginalUpperBound (double value)
 
- Public Member Functions inherited from BcpsObject
 BcpsObject ()
 
 BcpsObject (double lbh, double ubh, double lbs, double ubs)
 
virtual ~BcpsObject ()
 
 BcpsObject (const BcpsObject &rhs)
 
BcpsObjectoperator= (const BcpsObject &rhs)
 
virtual bool boundBranch (BcpsModel *m) const
 
virtual void floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const
 
virtual double upEstimate () const
 
virtual double downEstimate () const
 
virtual void printDesc ()
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 
virtual AlpsKnowledgedecode (AlpsEncoded &encoded) const
 
virtual AlpsEncodedencode () const
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 
int getObjectIndex () const
 
BcpsObjRep_t getRepType () const
 
BcpsIntegral_t getIntType () const
 
BcpsValidRegion getValidRegion () const
 
int getStatus () const
 
double getLbHard () const
 
double getUbHard () const
 
double getLbSoft () const
 
double getUbSoft () const
 
int getNumInactive () const
 
double getEffectiveness () const
 
void setObjectIndex (int ind)
 
void setRepType (BcpsObjRep_t rt)
 
void setIntType (BcpsIntegral_t it)
 
void setValidRegion (BcpsValidRegion val)
 
void setStatus (int st)
 
void setLbHard (double lb)
 
void setUbHard (double ub)
 
void setLbSoft (double lb)
 
void setUbSoft (double ub)
 
void setNumInactive (int num)
 
void setEffectiveness (double eff)
 
virtual void hashing (BcpsModel *model=NULL)
 
double hashValue () const
 
int getObjectIndex () const
 
BcpsObjRep_t getRepType () const
 
BcpsIntegral_t getIntType () const
 
BcpsValidRegion getValidRegion () const
 
int getStatus () const
 
double getLbHard () const
 
double getUbHard () const
 
double getLbSoft () const
 
double getUbSoft () const
 
int getNumInactive () const
 
double getEffectiveness () const
 
void setObjectIndex (int ind)
 
void setRepType (BcpsObjRep_t rt)
 
void setIntType (BcpsIntegral_t it)
 
void setValidRegion (BcpsValidRegion val)
 
void setStatus (int st)
 
void setLbHard (double lb)
 
void setUbHard (double ub)
 
void setLbSoft (double lb)
 
void setUbSoft (double ub)
 
void setNumInactive (int num)
 
void setEffectiveness (double eff)
 
virtual void hashing (BcpsModel *model=NULL)
 
double hashValue () const
 
- Public Member Functions inherited from AlpsKnowledge
 AlpsKnowledge ()
 
virtual ~AlpsKnowledge ()
 
KnowledgeType getType ()
 
void setType (KnowledgeType t)
 
AlpsEncodedgetEncoded () const
 
void setEncoded (AlpsEncoded *e)
 

Protected Attributes

int columnIndex_
 Column index in the lp model. More...
 
double originalLower_
 Original lower bound. More...
 
double originalUpper_
 Original upper bound. More...
 
double breakEven_
 Breakeven i.e. More...
 
BlisPseudocost pseudocost_
 Pseudo cost. More...
 
- Protected Attributes inherited from BcpsObject
int objectIndex_
 
BcpsObjRep_t repType_
 
BcpsIntegral_t intType_
 
BcpsValidRegion validRegion_
 
int status_
 
double lbHard_
 
double ubHard_
 
double lbSoft_
 
double ubSoft_
 
double hashValue_
 
int numInactive_
 
double effectiveness_
 
- Protected Attributes inherited from AlpsKnowledge
KnowledgeType type_
 

Additional Inherited Members

- Protected Member Functions inherited from BcpsObject
AlpsReturnStatus encodeBcpsObject (AlpsEncoded *encoded) const
 
AlpsReturnStatus decodeBcpsObject (AlpsEncoded &encoded)
 

Detailed Description

Definition at line 36 of file BlisObjectInt.h.

Constructor & Destructor Documentation

◆ BlisObjectInt() [1/3]

BlisObjectInt::BlisObjectInt ( )

Default Constructor.

◆ BlisObjectInt() [2/3]

BlisObjectInt::BlisObjectInt ( int  objectIndex,
int  iColumn,
double  lb,
double  ub,
double  breakEven = 0.5 
)

Useful constructor - passed integer index and model index.

◆ ~BlisObjectInt()

virtual BlisObjectInt::~BlisObjectInt ( )
inlinevirtual

Destructor.

Definition at line 68 of file BlisObjectInt.h.

◆ BlisObjectInt() [3/3]

BlisObjectInt::BlisObjectInt ( const BlisObjectInt )

Copy constructor.

Member Function Documentation

◆ clone()

virtual BcpsObject* BlisObjectInt::clone ( ) const
inlinevirtual

Clone an object.

Reimplemented from BcpsObject.

Definition at line 74 of file BlisObjectInt.h.

◆ operator=()

BlisObjectInt& BlisObjectInt::operator= ( const BlisObjectInt rhs)

Assignment operator.

◆ infeasibility()

virtual double BlisObjectInt::infeasibility ( BcpsModel m,
int &  preferredWay 
) const
virtual

Infeasibility.

Range is [0.0, 0.5].

Parameters
PreferredWaythe direction close to an integer.

Reimplemented from BcpsObject.

◆ feasibleRegion()

virtual void BlisObjectInt::feasibleRegion ( BcpsModel m)
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.

Reimplemented from BcpsObject.

◆ createBranchObject()

virtual BcpsBranchObject* BlisObjectInt::createBranchObject ( BcpsModel m,
int  direction 
) const
virtual

Creates a branching object.

Reimplemented from BcpsObject.

◆ preferredNewFeasible()

virtual BcpsBranchObject* BlisObjectInt::preferredNewFeasible ( BcpsModel m) 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 BcpsObject.

◆ notPreferredNewFeasible()

virtual BcpsBranchObject* BlisObjectInt::notPreferredNewFeasible ( BcpsModel m) 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 BcpsObject.

◆ resetBounds()

virtual void BlisObjectInt::resetBounds ( BcpsModel m)
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 BcpsObject.

◆ columnIndex()

virtual int BlisObjectInt::columnIndex ( ) const
inlinevirtual

Column number if single column object, otherwise.

Definition at line 129 of file BlisObjectInt.h.

◆ originalLowerBound()

double BlisObjectInt::originalLowerBound ( ) const
inline

Definition at line 133 of file BlisObjectInt.h.

◆ setOriginalLowerBound()

void BlisObjectInt::setOriginalLowerBound ( double  value)
inline

Definition at line 134 of file BlisObjectInt.h.

◆ originalUpperBound()

double BlisObjectInt::originalUpperBound ( ) const
inline

Definition at line 135 of file BlisObjectInt.h.

◆ setOriginalUpperBound()

void BlisObjectInt::setOriginalUpperBound ( double  value)
inline

Definition at line 136 of file BlisObjectInt.h.

◆ breakEven()

double BlisObjectInt::breakEven ( ) const
inline

Breakeven e.g 0.7 -> >= 0.7 go up first.

Definition at line 140 of file BlisObjectInt.h.

◆ setBreakEven()

void BlisObjectInt::setBreakEven ( double  value)
inline

Set breakeven e.g 0.7 -> >= 0.7 go up first.

Definition at line 143 of file BlisObjectInt.h.

◆ pseudocost()

BlisPseudocost& BlisObjectInt::pseudocost ( )
inline

Access pseudocost.

Definition at line 146 of file BlisObjectInt.h.

Member Data Documentation

◆ columnIndex_

int BlisObjectInt::columnIndex_
protected

Column index in the lp model.

Definition at line 41 of file BlisObjectInt.h.

◆ originalLower_

double BlisObjectInt::originalLower_
protected

Original lower bound.

Definition at line 44 of file BlisObjectInt.h.

◆ originalUpper_

double BlisObjectInt::originalUpper_
protected

Original upper bound.

Definition at line 47 of file BlisObjectInt.h.

◆ breakEven_

double BlisObjectInt::breakEven_
protected

Breakeven i.e.

>= this preferred is up.

Definition at line 50 of file BlisObjectInt.h.

◆ pseudocost_

BlisPseudocost BlisObjectInt::pseudocost_
protected

Pseudo cost.

Definition at line 53 of file BlisObjectInt.h.


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