27 #include "AlpsKnowledge.h" 36 #define BCPS_NONREMOVALBE 0x0001 37 #define BCPS_BRACNEDON 0x0010 38 #define BCPS_SENDABLE 0x0100 279 double &ceilingValue,
281 double tolerance)
const;
295 AlpsReturnStatus status = AlpsReturnStatusOk;
311 AlpsReturnStatus status = AlpsReturnStatusOk;
329 using AlpsKnowledge::encode ;
331 virtual AlpsReturnStatus
encode(AlpsEncoded *encoded) {
332 AlpsReturnStatus status = AlpsReturnStatusOk;
338 virtual AlpsKnowledge*
decode(AlpsEncoded& encoded)
const {
339 AlpsKnowledge* know = NULL;
AlpsReturnStatus encodeBcpsObject(AlpsEncoded *encoded) const
Pack Bcps part to a encode object.
BcpsConstraint(const BcpsConstraint &rhs)
Copy constructor.
virtual double infeasibility(BcpsModel *m, int &preferredWay) const
Infeasibility of the object This is some measure of the infeasibility of the object.
double lbSoft_
The current lower bound of the object.
void setLbHard(double lb)
virtual AlpsReturnStatus encode(AlpsEncoded *encoded)
Pack into a encode object.
BcpsVariable(double lbh, double ubh, double lbs, double ubs)
Useful constructor.
virtual BcpsObject_t getObjType() const
int status_
The status of the object.
virtual BcpsObject * clone() const
Clone an enity.
virtual void floorCeiling(double &floorValue, double &ceilingValue, double value, double tolerance) const
Returns floor and ceiling i.e.
void setNumInactive(int num)
BcpsConstraint(double lbh, double ubh, double lbs, double ubs)
Useful constructor.
double ubHard_
The upper bound of the object when it was first created.
int getObjectIndex() const
Return the value of the appropriate field.
void setObjectIndex(int ind)
Set the appropriate property.
virtual double downEstimate() const
Return "down" estimate.
void setValidRegion(BcpsValidRegion val)
virtual BcpsBranchObject * preferredNewFeasible(BcpsModel *m) const
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new f...
BcpsValidRegion getValidRegion() const
virtual void feasibleRegion(BcpsModel *m)
Look at the current solution and set bounds to match the solution.
BcpsIntegral_t getIntType() const
BcpsObject(const BcpsObject &rhs)
Copy constructor.
BcpsObjRep_t getRepType() const
double hashValue_
The hash value of this object.
virtual void hashing(BcpsModel *model=NULL)
Hashing.
void setLbSoft(double lb)
virtual BcpsObject_t getObjType() const
void setIntType(BcpsIntegral_t it)
void setUbHard(double ub)
void setUbSoft(double ub)
virtual BcpsBranchObject * createBranchObject(BcpsModel *m, int way) const
Create a branching object and indicate which way to branch first.
int getNumInactive() const
double ubSoft_
The current upper bound of the object.
BcpsVariable(const BcpsVariable &rhs)
Copy constructor.
char BcpsIntegral_t
typedef's for various integral types.
BcpsObject(double lbh, double ubh, double lbs, double ubs)
virtual bool boundBranch(BcpsModel *m) const
Return true if branches created by object will modify variable bounds.
virtual ~BcpsConstraint()
Desctructor constructor.
A class for describing the objects that comprise a BCPS subproblem.
int numInactive_
Number of inactive when in formulation.
BcpsIntegral_t intType_
The integrality type of the object, i.e., what values it can take up between the specified bounds.
BcpsVariable()
Default constructor.
virtual void resetBounds(BcpsModel *m)
Reset variable bounds to their original values.
virtual double upEstimate() const
Return "up" estimate.
BcpsObject & operator=(const BcpsObject &rhs)
Assignment operator.
BcpsObject * BcpsObject_p
BcpsObject_t
The possible types of an object: primal or dual (i.e., variable or constraint.
void setRepType(BcpsObjRep_t rt)
BcpsConstraint()
Default constructor.
int objectIndex_
Global index of this object.
double getEffectiveness() const
BcpsBranchObject contains the member data required when choosing branching entities and excuting actu...
virtual ~BcpsVariable()
Destructor.
double effectiveness_
Effectiveness: nonnegative value.
BcpsObjRep_t repType_
Core, indexed, or algorithmic.
virtual BcpsBranchObject * notPreferredNewFeasible(BcpsModel *m) const
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new f...
void setEffectiveness(double eff)
virtual AlpsKnowledge * decode(AlpsEncoded &encoded) const
Decode a constraint from an encoded object.
AlpsReturnStatus decodeBcpsObject(AlpsEncoded &encoded)
Unpack Bcps part from a encode object.
BcpsObjRep_t
The possible representations types of an object.
BcpsValidRegion validRegion_
Valid in the whole tree or only the subtree rooted at the node that generate this object.
double lbHard_
The lower bound of the object when it was first created.