Bcps 0.95.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BcpsObject Class Reference

A class for describing the objects that comprise a BCPS subproblem. More...

#include <BcpsObject.h>

+ Inheritance diagram for BcpsObject:
+ Collaboration diagram for BcpsObject:

Public Member Functions

 BcpsObject ()
 
 BcpsObject (double lbh, double ubh, double lbs, double ubs)
 
virtual ~BcpsObject ()
 
 BcpsObject (const BcpsObject &rhs)
 Copy constructor.
 
BcpsObjectoperator= (const BcpsObject &rhs)
 Assignment operator.
 
virtual BcpsObjectclone () const
 Clone an enity.
 
virtual double infeasibility (BcpsModel *m, int &preferredWay) const
 Infeasibility of the object This is some measure of the infeasibility of the object.
 
virtual void feasibleRegion (BcpsModel *m)
 Look at the current solution and set bounds to match the solution.
 
virtual BcpsBranchObjectcreateBranchObject (BcpsModel *m, int way) const
 Create a branching object and indicate which way to branch first.
 
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 a good direction.
 
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.
 
virtual void resetBounds (BcpsModel *m)
 Reset variable bounds to their original values.
 
virtual bool boundBranch (BcpsModel *m) const
 Return true if branches created by object will modify variable bounds.
 
virtual void floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const
 Returns floor and ceiling i.e.
 
virtual double upEstimate () const
 Return "up" estimate.
 
virtual double downEstimate () const
 Return "down" estimate.
 
virtual void printDesc ()
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 Pack into a encode object.
 
virtual AlpsKnowledge * decode (AlpsEncoded &encoded) const
 Decode a constraint from an encoded object.
 
int getObjectIndex () const
 Return the value of the appropriate field.
 
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)
 Set the appropriate property.
 
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)
 Hashing.
 
double hashValue () const
 

Protected Member Functions

AlpsReturnStatus encodeBcpsObject (AlpsEncoded *encoded) const
 Pack Bcps part to a encode object.
 
AlpsReturnStatus decodeBcpsObject (AlpsEncoded &encoded)
 Unpack Bcps part from a encode object.
 

Protected Attributes

int objectIndex_
 Global index of this object.
 
BcpsObjRep_t repType_
 Core, indexed, or algorithmic.
 
BcpsIntegral_t intType_
 The integrality type of the object, i.e., what values it can take up between the specified bounds.
 
BcpsValidRegion validRegion_
 Valid in the whole tree or only the subtree rooted at the node that generate this object.
 
int status_
 The status of the object.
 
double lbHard_
 The lower bound of the object when it was first created.
 
double ubHard_
 The upper bound of the object when it was first created.
 
double lbSoft_
 The current lower bound of the object.
 
double ubSoft_
 The current upper bound of the object.
 
double hashValue_
 The hash value of this object.
 
int numInactive_
 Number of inactive when in formulation.
 
double effectiveness_
 Effectiveness: nonnegative value.
 

Detailed Description

A class for describing the objects that comprise a BCPS subproblem.

At the BCPS level, all that is assumed about an object is that it has bounds and that it has an integrality type. The concept that an object

Definition at line 77 of file BcpsObject.h.

Constructor & Destructor Documentation

◆ BcpsObject() [1/3]

BcpsObject::BcpsObject ( )
inline

Definition at line 125 of file BcpsObject.h.

◆ BcpsObject() [2/3]

BcpsObject::BcpsObject ( double lbh,
double ubh,
double lbs,
double ubs )
inline

Definition at line 141 of file BcpsObject.h.

◆ ~BcpsObject()

virtual BcpsObject::~BcpsObject ( )
inlinevirtual

Definition at line 157 of file BcpsObject.h.

◆ BcpsObject() [3/3]

BcpsObject::BcpsObject ( const BcpsObject & rhs)
inline

Copy constructor.

Definition at line 160 of file BcpsObject.h.

Member Function Documentation

◆ operator=()

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

Assignment operator.

◆ clone()

virtual BcpsObject * BcpsObject::clone ( ) const
inlinevirtual

Clone an enity.

Definition at line 179 of file BcpsObject.h.

◆ getObjectIndex()

int BcpsObject::getObjectIndex ( ) const
inline

Return the value of the appropriate field.

Definition at line 186 of file BcpsObject.h.

◆ getRepType()

BcpsObjRep_t BcpsObject::getRepType ( ) const
inline

Definition at line 187 of file BcpsObject.h.

◆ getIntType()

BcpsIntegral_t BcpsObject::getIntType ( ) const
inline

Definition at line 188 of file BcpsObject.h.

◆ getValidRegion()

BcpsValidRegion BcpsObject::getValidRegion ( ) const
inline

Definition at line 189 of file BcpsObject.h.

◆ getStatus()

int BcpsObject::getStatus ( ) const
inline

Definition at line 190 of file BcpsObject.h.

◆ getLbHard()

double BcpsObject::getLbHard ( ) const
inline

Definition at line 191 of file BcpsObject.h.

◆ getUbHard()

double BcpsObject::getUbHard ( ) const
inline

Definition at line 192 of file BcpsObject.h.

◆ getLbSoft()

double BcpsObject::getLbSoft ( ) const
inline

Definition at line 193 of file BcpsObject.h.

◆ getUbSoft()

double BcpsObject::getUbSoft ( ) const
inline

Definition at line 194 of file BcpsObject.h.

◆ getNumInactive()

int BcpsObject::getNumInactive ( ) const
inline

Definition at line 195 of file BcpsObject.h.

◆ getEffectiveness()

double BcpsObject::getEffectiveness ( ) const
inline

Definition at line 196 of file BcpsObject.h.

◆ setObjectIndex()

void BcpsObject::setObjectIndex ( int ind)
inline

Set the appropriate property.

Definition at line 201 of file BcpsObject.h.

◆ setRepType()

void BcpsObject::setRepType ( BcpsObjRep_t rt)
inline

Definition at line 202 of file BcpsObject.h.

◆ setIntType()

void BcpsObject::setIntType ( BcpsIntegral_t it)
inline

Definition at line 203 of file BcpsObject.h.

◆ setValidRegion()

void BcpsObject::setValidRegion ( BcpsValidRegion val)
inline

Definition at line 204 of file BcpsObject.h.

◆ setStatus()

void BcpsObject::setStatus ( int st)
inline

Definition at line 205 of file BcpsObject.h.

◆ setLbHard()

void BcpsObject::setLbHard ( double lb)
inline

Definition at line 206 of file BcpsObject.h.

◆ setUbHard()

void BcpsObject::setUbHard ( double ub)
inline

Definition at line 207 of file BcpsObject.h.

◆ setLbSoft()

void BcpsObject::setLbSoft ( double lb)
inline

Definition at line 208 of file BcpsObject.h.

◆ setUbSoft()

void BcpsObject::setUbSoft ( double ub)
inline

Definition at line 209 of file BcpsObject.h.

◆ setNumInactive()

void BcpsObject::setNumInactive ( int num)
inline

Definition at line 210 of file BcpsObject.h.

◆ setEffectiveness()

void BcpsObject::setEffectiveness ( double eff)
inline

Definition at line 211 of file BcpsObject.h.

◆ hashing()

virtual void BcpsObject::hashing ( BcpsModel * model = NULL)
inlinevirtual

Hashing.

Definition at line 216 of file BcpsObject.h.

◆ hashValue()

double BcpsObject::hashValue ( ) const
inline

Definition at line 217 of file BcpsObject.h.

◆ infeasibility()

virtual double BcpsObject::infeasibility ( BcpsModel * m,
int & preferredWay ) const
inlinevirtual

Infeasibility of the object This is some measure of the infeasibility of the object.

It should be scaled to be in the range [0.0, 0.5], with 0.0 indicating the object is satisfied.

The preferred branching direction is returned in preferredWay,

This is used to prepare for strong branching but should also think of case when no strong branching

The object may also compute an estimate of cost of going "up" or "down". This will probably be based on pseudo-cost ideas.

Definition at line 232 of file BcpsObject.h.

◆ feasibleRegion()

virtual void BcpsObject::feasibleRegion ( BcpsModel * m)
inlinevirtual

Look at the current solution and set bounds to match the solution.

Definition at line 237 of file BcpsObject.h.

◆ createBranchObject()

virtual BcpsBranchObject * BcpsObject::createBranchObject ( BcpsModel * m,
int way ) const
inlinevirtual

Create a branching object and indicate which way to branch first.

The branching object has to know how to create branches (fix variables, etc.)

Definition at line 242 of file BcpsObject.h.

◆ preferredNewFeasible()

virtual BcpsBranchObject * BcpsObject::preferredNewFeasible ( BcpsModel * m) const
inlinevirtual

Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a good direction.

If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.

Definition at line 253 of file BcpsObject.h.

◆ notPreferredNewFeasible()

virtual BcpsBranchObject * BcpsObject::notPreferredNewFeasible ( BcpsModel * m) const
inlinevirtual

Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a bad direction.

If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null.

Definition at line 264 of file BcpsObject.h.

◆ resetBounds()

virtual void BcpsObject::resetBounds ( BcpsModel * m)
inlinevirtual

Reset variable bounds to their original values.

Bounds may be tightened, so it may be good to be able to reset them to their original values.

Definition at line 272 of file BcpsObject.h.

◆ boundBranch()

virtual bool BcpsObject::boundBranch ( BcpsModel * m) const
inlinevirtual

Return true if branches created by object will modify variable bounds.

Definition at line 276 of file BcpsObject.h.

◆ floorCeiling()

virtual void BcpsObject::floorCeiling ( double & floorValue,
double & ceilingValue,
double value,
double tolerance ) const
virtual

Returns floor and ceiling i.e.

closest valid points.

◆ upEstimate()

virtual double BcpsObject::upEstimate ( ) const
inlinevirtual

Return "up" estimate.

Default: 1.0e-5.

Definition at line 285 of file BcpsObject.h.

◆ downEstimate()

virtual double BcpsObject::downEstimate ( ) const
inlinevirtual

Return "down" estimate.

Default: 1.0e-5.

Definition at line 288 of file BcpsObject.h.

◆ printDesc()

virtual void BcpsObject::printDesc ( )
inlinevirtual

Definition at line 290 of file BcpsObject.h.

◆ encodeBcpsObject()

AlpsReturnStatus BcpsObject::encodeBcpsObject ( AlpsEncoded * encoded) const
inlineprotected

Pack Bcps part to a encode object.

Definition at line 295 of file BcpsObject.h.

◆ decodeBcpsObject()

AlpsReturnStatus BcpsObject::decodeBcpsObject ( AlpsEncoded & encoded)
inlineprotected

Unpack Bcps part from a encode object.

Definition at line 311 of file BcpsObject.h.

◆ encode()

virtual AlpsReturnStatus BcpsObject::encode ( AlpsEncoded * encoded)
inlinevirtual

Pack into a encode object.

Definition at line 332 of file BcpsObject.h.

◆ decode()

virtual AlpsKnowledge * BcpsObject::decode ( AlpsEncoded & encoded) const
inlinevirtual

Decode a constraint from an encoded object.

Definition at line 339 of file BcpsObject.h.

Member Data Documentation

◆ objectIndex_

int BcpsObject::objectIndex_
protected

Global index of this object.

Definition at line 82 of file BcpsObject.h.

◆ repType_

BcpsObjRep_t BcpsObject::repType_
protected

Core, indexed, or algorithmic.

Definition at line 85 of file BcpsObject.h.

◆ intType_

BcpsIntegral_t BcpsObject::intType_
protected

The integrality type of the object, i.e., what values it can take up between the specified bounds.

(Possible options: 'C' for continuous, 'I' for general integer, 'B' for binary and 'S' for semicontinuous)

Definition at line 91 of file BcpsObject.h.

◆ validRegion_

BcpsValidRegion BcpsObject::validRegion_
protected

Valid in the whole tree or only the subtree rooted at the node that generate this object.

Definition at line 95 of file BcpsObject.h.

◆ status_

int BcpsObject::status_
protected

The status of the object.

Definition at line 100 of file BcpsObject.h.

◆ lbHard_

double BcpsObject::lbHard_
protected

The lower bound of the object when it was first created.

Definition at line 103 of file BcpsObject.h.

◆ ubHard_

double BcpsObject::ubHard_
protected

The upper bound of the object when it was first created.

Definition at line 106 of file BcpsObject.h.

◆ lbSoft_

double BcpsObject::lbSoft_
protected

The current lower bound of the object.

Definition at line 109 of file BcpsObject.h.

◆ ubSoft_

double BcpsObject::ubSoft_
protected

The current upper bound of the object.

Definition at line 112 of file BcpsObject.h.

◆ hashValue_

double BcpsObject::hashValue_
protected

The hash value of this object.

Definition at line 115 of file BcpsObject.h.

◆ numInactive_

int BcpsObject::numInactive_
protected

Number of inactive when in formulation.

Definition at line 118 of file BcpsObject.h.

◆ effectiveness_

double BcpsObject::effectiveness_
protected

Effectiveness: nonnegative value.

Definition at line 121 of file BcpsObject.h.


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