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:
Inheritance graph
[legend]
Collaboration diagram for BcpsObject:
Collaboration graph
[legend]

Public Member Functions

 BcpsObject ()
 
 BcpsObject (double lbh, double ubh, double lbs, double ubs)
 
virtual ~BcpsObject ()
 
 BcpsObject (const BcpsObject &rhs)
 Copy constructor. More...
 
BcpsObjectoperator= (const BcpsObject &rhs)
 Assignment operator. More...
 
virtual BcpsObjectclone () const
 Clone an enity. More...
 
virtual double infeasibility (BcpsModel *m, int &preferredWay) const
 Infeasibility of the object This is some measure of the infeasibility of the object. More...
 
virtual void feasibleRegion (BcpsModel *m)
 Look at the current solution and set bounds to match the solution. More...
 
virtual BcpsBranchObjectcreateBranchObject (BcpsModel *m, int way) const
 Create a branching object and indicate which way to branch first. 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 a 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 variable bounds to their original values. More...
 
virtual bool boundBranch (BcpsModel *m) const
 Return true if branches created by object will modify variable bounds. More...
 
virtual void floorCeiling (double &floorValue, double &ceilingValue, double value, double tolerance) const
 Returns floor and ceiling i.e. More...
 
virtual double upEstimate () const
 Return "up" estimate. More...
 
virtual double downEstimate () const
 Return "down" estimate. More...
 
virtual void printDesc ()
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 Pack into a encode object. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &encoded) const
 Decode a constraint from an encoded object. More...
 
int getObjectIndex () const
 Return the value of the appropriate field. More...
 
BcpsObjRep_t getRepType () const
 Return the value of the appropriate field. More...
 
BcpsIntegral_t getIntType () const
 Return the value of the appropriate field. More...
 
BcpsValidRegion getValidRegion () const
 Return the value of the appropriate field. More...
 
int getStatus () const
 Return the value of the appropriate field. More...
 
double getLbHard () const
 Return the value of the appropriate field. More...
 
double getUbHard () const
 Return the value of the appropriate field. More...
 
double getLbSoft () const
 Return the value of the appropriate field. More...
 
double getUbSoft () const
 Return the value of the appropriate field. More...
 
int getNumInactive () const
 Return the value of the appropriate field. More...
 
double getEffectiveness () const
 Return the value of the appropriate field. More...
 
void setObjectIndex (int ind)
 Set the appropriate property. More...
 
void setRepType (BcpsObjRep_t rt)
 Set the appropriate property. More...
 
void setIntType (BcpsIntegral_t it)
 Set the appropriate property. More...
 
void setValidRegion (BcpsValidRegion val)
 Set the appropriate property. More...
 
void setStatus (int st)
 Set the appropriate property. More...
 
void setLbHard (double lb)
 Set the appropriate property. More...
 
void setUbHard (double ub)
 Set the appropriate property. More...
 
void setLbSoft (double lb)
 Set the appropriate property. More...
 
void setUbSoft (double ub)
 Set the appropriate property. More...
 
void setNumInactive (int num)
 Set the appropriate property. More...
 
void setEffectiveness (double eff)
 Set the appropriate property. More...
 
virtual void hashing (BcpsModel *model=NULL)
 Hashing. More...
 
double hashValue () const
 Hashing. More...
 
- Public Member Functions inherited from AlpsKnowledge
 AlpsKnowledge ()
 
virtual ~AlpsKnowledge ()
 
KnowledgeType getType ()
 
void setType (KnowledgeType t)
 
virtual AlpsEncodedencode () const
 This method should encode the content of the object and return a pointer to the encoded form. More...
 
AlpsEncodedgetEncoded () const
 Get/set encoded. More...
 
void setEncoded (AlpsEncoded *e)
 

Protected Member Functions

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

Protected Attributes

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

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 76 of file BcpsObject.h.

Constructor & Destructor Documentation

BcpsObject::BcpsObject ( )
inline

Definition at line 124 of file BcpsObject.h.

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

Definition at line 140 of file BcpsObject.h.

virtual BcpsObject::~BcpsObject ( )
inlinevirtual

Definition at line 156 of file BcpsObject.h.

BcpsObject::BcpsObject ( const BcpsObject rhs)
inline

Copy constructor.

Definition at line 159 of file BcpsObject.h.

Member Function Documentation

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

Assignment operator.

virtual BcpsObject* BcpsObject::clone ( ) const
inlinevirtual

Clone an enity.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 178 of file BcpsObject.h.

int BcpsObject::getObjectIndex ( ) const
inline

Return the value of the appropriate field.

Definition at line 185 of file BcpsObject.h.

BcpsObjRep_t BcpsObject::getRepType ( ) const
inline

Return the value of the appropriate field.

Definition at line 186 of file BcpsObject.h.

BcpsIntegral_t BcpsObject::getIntType ( ) const
inline

Return the value of the appropriate field.

Definition at line 187 of file BcpsObject.h.

BcpsValidRegion BcpsObject::getValidRegion ( ) const
inline

Return the value of the appropriate field.

Definition at line 188 of file BcpsObject.h.

int BcpsObject::getStatus ( ) const
inline

Return the value of the appropriate field.

Definition at line 189 of file BcpsObject.h.

double BcpsObject::getLbHard ( ) const
inline

Return the value of the appropriate field.

Definition at line 190 of file BcpsObject.h.

double BcpsObject::getUbHard ( ) const
inline

Return the value of the appropriate field.

Definition at line 191 of file BcpsObject.h.

double BcpsObject::getLbSoft ( ) const
inline

Return the value of the appropriate field.

Definition at line 192 of file BcpsObject.h.

double BcpsObject::getUbSoft ( ) const
inline

Return the value of the appropriate field.

Definition at line 193 of file BcpsObject.h.

int BcpsObject::getNumInactive ( ) const
inline

Return the value of the appropriate field.

Definition at line 194 of file BcpsObject.h.

double BcpsObject::getEffectiveness ( ) const
inline

Return the value of the appropriate field.

Definition at line 195 of file BcpsObject.h.

void BcpsObject::setObjectIndex ( int  ind)
inline

Set the appropriate property.

Definition at line 200 of file BcpsObject.h.

void BcpsObject::setRepType ( BcpsObjRep_t  rt)
inline

Set the appropriate property.

Definition at line 201 of file BcpsObject.h.

void BcpsObject::setIntType ( BcpsIntegral_t  it)
inline

Set the appropriate property.

Definition at line 202 of file BcpsObject.h.

void BcpsObject::setValidRegion ( BcpsValidRegion  val)
inline

Set the appropriate property.

Definition at line 203 of file BcpsObject.h.

void BcpsObject::setStatus ( int  st)
inline

Set the appropriate property.

Definition at line 204 of file BcpsObject.h.

void BcpsObject::setLbHard ( double  lb)
inline

Set the appropriate property.

Definition at line 205 of file BcpsObject.h.

void BcpsObject::setUbHard ( double  ub)
inline

Set the appropriate property.

Definition at line 206 of file BcpsObject.h.

void BcpsObject::setLbSoft ( double  lb)
inline

Set the appropriate property.

Definition at line 207 of file BcpsObject.h.

void BcpsObject::setUbSoft ( double  ub)
inline

Set the appropriate property.

Definition at line 208 of file BcpsObject.h.

void BcpsObject::setNumInactive ( int  num)
inline

Set the appropriate property.

Definition at line 209 of file BcpsObject.h.

void BcpsObject::setEffectiveness ( double  eff)
inline

Set the appropriate property.

Definition at line 210 of file BcpsObject.h.

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

Hashing.

Reimplemented in BlisConstraint, and BlisConstraint.

Definition at line 215 of file BcpsObject.h.

double BcpsObject::hashValue ( ) const
inline

Hashing.

Definition at line 216 of file BcpsObject.h.

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.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 231 of file BcpsObject.h.

virtual void BcpsObject::feasibleRegion ( BcpsModel m)
inlinevirtual

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

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 236 of file BcpsObject.h.

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

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 241 of file BcpsObject.h.

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.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 252 of file BcpsObject.h.

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.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 263 of file BcpsObject.h.

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.

Reimplemented in BlisObjectInt, and BlisObjectInt.

Definition at line 271 of file BcpsObject.h.

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

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

Definition at line 275 of file BcpsObject.h.

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

Returns floor and ceiling i.e.

closest valid points.

virtual double BcpsObject::upEstimate ( ) const
inlinevirtual

Return "up" estimate.

Default: 1.0e-5.

Definition at line 284 of file BcpsObject.h.

virtual double BcpsObject::downEstimate ( ) const
inlinevirtual

Return "down" estimate.

Default: 1.0e-5.

Definition at line 287 of file BcpsObject.h.

virtual void BcpsObject::printDesc ( )
inlinevirtual

Reimplemented in VrpVariable.

Definition at line 289 of file BcpsObject.h.

AlpsReturnStatus BcpsObject::encodeBcpsObject ( AlpsEncoded encoded) const
inlineprotected

Pack Bcps part to a encode object.

Definition at line 294 of file BcpsObject.h.

AlpsReturnStatus BcpsObject::decodeBcpsObject ( AlpsEncoded encoded)
inlineprotected

Unpack Bcps part from a encode object.

Definition at line 310 of file BcpsObject.h.

virtual AlpsReturnStatus BcpsObject::encode ( AlpsEncoded encoded)
inlinevirtual

Pack into a encode object.

Reimplemented from AlpsKnowledge.

Reimplemented in BlisVariable, BlisVariable, BlisConstraint, VrpVariable, and BlisConstraint.

Definition at line 331 of file BcpsObject.h.

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

Decode a constraint from an encoded object.

Reimplemented from AlpsKnowledge.

Reimplemented in BlisVariable, BlisVariable, VrpVariable, BlisConstraint, and BlisConstraint.

Definition at line 338 of file BcpsObject.h.

Member Data Documentation

int BcpsObject::objectIndex_
protected

Global index of this object.

Definition at line 81 of file BcpsObject.h.

BcpsObjRep_t BcpsObject::repType_
protected

Core, indexed, or algorithmic.

Definition at line 84 of file BcpsObject.h.

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 90 of file BcpsObject.h.

BcpsValidRegion BcpsObject::validRegion_
protected

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

Definition at line 94 of file BcpsObject.h.

int BcpsObject::status_
protected

The status of the object.

Definition at line 99 of file BcpsObject.h.

double BcpsObject::lbHard_
protected

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

Definition at line 102 of file BcpsObject.h.

double BcpsObject::ubHard_
protected

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

Definition at line 105 of file BcpsObject.h.

double BcpsObject::lbSoft_
protected

The current lower bound of the object.

Definition at line 108 of file BcpsObject.h.

double BcpsObject::ubSoft_
protected

The current upper bound of the object.

Definition at line 111 of file BcpsObject.h.

double BcpsObject::hashValue_
protected

The hash value of this object.

Definition at line 114 of file BcpsObject.h.

int BcpsObject::numInactive_
protected

Number of inactive when in formulation.

Definition at line 117 of file BcpsObject.h.

double BcpsObject::effectiveness_
protected

Effectiveness: nonnegative value.

Definition at line 120 of file BcpsObject.h.


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