BcpsNodeDesc Class Reference

For a given type, the objectVecStorage_ structure holds the description. More...

#include <BcpsNodeDesc.h>

Inheritance diagram for BcpsNodeDesc:
Inheritance graph
[legend]
Collaboration diagram for BcpsNodeDesc:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BcpsNodeDesc ()
 Default constructor.
 BcpsNodeDesc (BcpsModel *m)
 Useful constructor.
virtual ~BcpsNodeDesc ()
 Destructor.
void initToNull ()
 Initialize member data.
void setVars (int numRem, const int *posRem, int numAdd, const BcpsObject **objects, bool relvlh, int numvlh, const int *vlhp, const double *vlhe, bool relvuh, int numvuh, const int *vuhp, const double *vuhe, bool relvls, int numvls, const int *vlsp, const double *vlse, bool relvus, int numvus, const int *vusp, const double *vuse)
 Set variable objects.
void assignVars (int numRem, int *&posRem, int numAdd, BcpsObject **&objects, bool relvlh, int numvlh, int *&vlhp, double *&vlhe, bool relvuh, int numvuh, int *&vuhp, double *&vuhe, bool relvls, int numvls, int *&vlsp, double *&vlse, bool relvus, int numvus, int *&vusp, double *&vuse)
 Assign variable objects.
void setCons (int numRem, const int *posRem, int numAdd, const BcpsObject **objects, bool relclh, int numclh, const int *clhp, const double *clhe, bool relcuh, int numcuh, const int *cuhp, const double *cuhe, bool relcls, int numcls, const int *clsp, const double *clse, bool relcus, int numcus, const int *cusp, const double *cuse)
 Set constraint objects.
void assignCons (int numRem, int *&posRem, int numAdd, BcpsObject **&objects, bool relclh, int numclh, int *&clhp, double *&clhe, bool relcuh, int numcuh, int *&cuhp, double *&cuhe, bool relcls, int numcls, int *&clsp, double *&clse, bool relcus, int numcus, int *&cusp, double *&cuse)
 Assign constraint objects.
BcpsObjectListModgetVars () const
 Get variable objects.
BcpsObjectListModgetCons () const
 Get constraint objects.
BcpsObjectListModvars ()
 Accesss varaibles.
BcpsObjectListModcons ()
 Accesss constraints.
void assignVarSoftBound (int numModSoftVarLB, int *&varLBi, double *&varLBv, int numModSoftVarUB, int *&varUBi, double *&varUBv)
 Set variable soft bounds.
void setVarSoftBound (int numModSoftVarLB, const int *varLBi, const double *varLBv, int numModSoftVarUB, const int *varUBi, const double *varUBv)
 Set variable soft bounds.
void assignVarHardBound (int numModHardVarLB, int *&varLBi, double *&varLBv, int numModHardVarUB, int *&varUBi, double *&varUBv)
 Set variable hard bounds.
void setConSoftBound (int numModSoftConLB, const int *conLBi, const double *conLBv, int numModSoftConUB, const int *conUBi, const double *conUBv)
 Set constraint soft bounds.
void setVarHardBound (int numModHardVarLB, const int *varLBi, const double *varLBv, int numModHardVarUB, const int *varUBi, const double *varUBv)
 Set variable hard bounds.
void setConHardBound (int numModHardConLB, const int *conLBi, const double *conLBv, int numModHardConUB, const int *conUBi, const double *conUBv)
 Set constraint hard bounds.
void appendAddedConstraints (int numAdd, BcpsObject **addCons)
 Recode the added constraints.
void setAddedConstraints (int numAdd, BcpsObject **addCons)
 Recode the added constraints.
void delConstraints (int numDel, int *indices)
 Record the constraints are deleted.
void addVariables (int numAdd, BcpsObject **addVars)
 Record added variables.
void delVariables (int numDel, int *indices)
 Record deleted variables.
AlpsReturnStatus encodeBcps (AlpsEncoded *encoded) const
 Pack bcps node description into an encoded.
AlpsReturnStatus decodeBcps (AlpsEncoded &encoded)
 Unpack bcps node description into an encoded.

Protected Member Functions

AlpsReturnStatus encodeDblFieldMods (AlpsEncoded *encoded, BcpsFieldListMod< double > *field) const
 Pack a double field into an encoded object.
AlpsReturnStatus encodeIntFieldMods (AlpsEncoded *encoded, BcpsFieldListMod< int > *field) const
 Pack a integer field into an encoded object.
AlpsReturnStatus encodeObjectMods (AlpsEncoded *encoded, BcpsObjectListMod *objMod) const
 Pack object modifications to an encoded object.
AlpsReturnStatus decodeDblFieldMods (AlpsEncoded &encoded, BcpsFieldListMod< double > *field)
 Unpack a double field from an encoded object.
AlpsReturnStatus decodeIntFieldMods (AlpsEncoded &encoded, BcpsFieldListMod< int > *field)
 Unpack a integer field from an encoded object.
AlpsReturnStatus decodeObjectMods (AlpsEncoded &encoded, BcpsObjectListMod *objMod)
 Unpack object modifications to an encoded object.

Protected Attributes

BcpsObjectListModvars_
 Variable objects.
BcpsObjectListModcons_
 Constraint objects.

Detailed Description

For a given type, the objectVecStorage_ structure holds the description.

This description is explicit if the numRemoved member is -1. In this case, the objects member holds the full list of objects of the given type. If an explicit description of the parent is given together with a relative description of the current node then the process of reconstructing the explicit description of the current node is as follows:

  1. initialize the explicit list L to be the parent's list;
  2. remove the objects on the indicated positions from L;
  3. modify the appropriate members of the objects in L according to the vectorMod_ members of the objectVecStorage_ structure;
  4. append the objects to be added to L.

If the numRemoved field is -1, that means that the current description is explicit. In this case, the contents of the vectorMod_ members are largely irrelevant, except for the relative fields which indicate whether the appropriate vectorMod_ member can ever be expressed as a relative description or not.

If the numRemoved field is >=0, then the current description is considered relative even if every vectorMod_ member contains explicit data. The description of a node can be either explicit or relative to its parent. In the node there are a number of object types and for each object type the explicit/relative description is considered separately.

If the information on an object type is relative, it means that at least one of the fields (lbHard, ubHard, etc.) has a relative description.

Definition at line 128 of file BcpsNodeDesc.h.


Constructor & Destructor Documentation

BcpsNodeDesc::BcpsNodeDesc (  )  [inline]

Default constructor.

Definition at line 141 of file BcpsNodeDesc.h.

BcpsNodeDesc::BcpsNodeDesc ( BcpsModel m  )  [inline]

Useful constructor.

Definition at line 144 of file BcpsNodeDesc.h.

virtual BcpsNodeDesc::~BcpsNodeDesc (  )  [virtual]

Destructor.


Member Function Documentation

void BcpsNodeDesc::initToNull (  ) 

Initialize member data.

void BcpsNodeDesc::setVars ( int  numRem,
const int *  posRem,
int  numAdd,
const BcpsObject **  objects,
bool  relvlh,
int  numvlh,
const int *  vlhp,
const double *  vlhe,
bool  relvuh,
int  numvuh,
const int *  vuhp,
const double *  vuhe,
bool  relvls,
int  numvls,
const int *  vlsp,
const double *  vlse,
bool  relvus,
int  numvus,
const int *  vusp,
const double *  vuse 
)

Set variable objects.

void BcpsNodeDesc::assignVars ( int  numRem,
int *&  posRem,
int  numAdd,
BcpsObject **&  objects,
bool  relvlh,
int  numvlh,
int *&  vlhp,
double *&  vlhe,
bool  relvuh,
int  numvuh,
int *&  vuhp,
double *&  vuhe,
bool  relvls,
int  numvls,
int *&  vlsp,
double *&  vlse,
bool  relvus,
int  numvus,
int *&  vusp,
double *&  vuse 
)

Assign variable objects.

Take over memory ownership.

void BcpsNodeDesc::setCons ( int  numRem,
const int *  posRem,
int  numAdd,
const BcpsObject **  objects,
bool  relclh,
int  numclh,
const int *  clhp,
const double *  clhe,
bool  relcuh,
int  numcuh,
const int *  cuhp,
const double *  cuhe,
bool  relcls,
int  numcls,
const int *  clsp,
const double *  clse,
bool  relcus,
int  numcus,
const int *  cusp,
const double *  cuse 
)

Set constraint objects.

void BcpsNodeDesc::assignCons ( int  numRem,
int *&  posRem,
int  numAdd,
BcpsObject **&  objects,
bool  relclh,
int  numclh,
int *&  clhp,
double *&  clhe,
bool  relcuh,
int  numcuh,
int *&  cuhp,
double *&  cuhe,
bool  relcls,
int  numcls,
int *&  clsp,
double *&  clse,
bool  relcus,
int  numcus,
int *&  cusp,
double *&  cuse 
)

Assign constraint objects.

Take over memory ownership.

BcpsObjectListMod* BcpsNodeDesc::getVars (  )  const [inline]

Get variable objects.

Definition at line 243 of file BcpsNodeDesc.h.

BcpsObjectListMod* BcpsNodeDesc::getCons (  )  const [inline]

Get constraint objects.

Definition at line 246 of file BcpsNodeDesc.h.

BcpsObjectListMod* BcpsNodeDesc::vars (  )  [inline]

Accesss varaibles.

Definition at line 249 of file BcpsNodeDesc.h.

BcpsObjectListMod* BcpsNodeDesc::cons (  )  [inline]

Accesss constraints.

Definition at line 252 of file BcpsNodeDesc.h.

void BcpsNodeDesc::assignVarSoftBound ( int  numModSoftVarLB,
int *&  varLBi,
double *&  varLBv,
int  numModSoftVarUB,
int *&  varUBi,
double *&  varUBv 
)

Set variable soft bounds.

Take ownerships of arraies.

void BcpsNodeDesc::setVarSoftBound ( int  numModSoftVarLB,
const int *  varLBi,
const double *  varLBv,
int  numModSoftVarUB,
const int *  varUBi,
const double *  varUBv 
)

Set variable soft bounds.

Don't take ownerships of arraies.

void BcpsNodeDesc::assignVarHardBound ( int  numModHardVarLB,
int *&  varLBi,
double *&  varLBv,
int  numModHardVarUB,
int *&  varUBi,
double *&  varUBv 
)

Set variable hard bounds.

Take ownerships of arraies.

void BcpsNodeDesc::setConSoftBound ( int  numModSoftConLB,
const int *  conLBi,
const double *  conLBv,
int  numModSoftConUB,
const int *  conUBi,
const double *  conUBv 
)

Set constraint soft bounds.

Don't take ownerships of arraies.

void BcpsNodeDesc::setVarHardBound ( int  numModHardVarLB,
const int *  varLBi,
const double *  varLBv,
int  numModHardVarUB,
const int *  varUBi,
const double *  varUBv 
)

Set variable hard bounds.

Don't take ownerships of arraies.

void BcpsNodeDesc::setConHardBound ( int  numModHardConLB,
const int *  conLBi,
const double *  conLBv,
int  numModHardConUB,
const int *  conUBi,
const double *  conUBv 
)

Set constraint hard bounds.

Don't take ownerships of arraies.

void BcpsNodeDesc::appendAddedConstraints ( int  numAdd,
BcpsObject **  addCons 
) [inline]

Recode the added constraints.

Take over the memory ownship of aguments. Append to previous constraints.

Definition at line 304 of file BcpsNodeDesc.h.

void BcpsNodeDesc::setAddedConstraints ( int  numAdd,
BcpsObject **  addCons 
) [inline]

Recode the added constraints.

Take over the memory ownship of aguments. Delete already added constraints.

Definition at line 323 of file BcpsNodeDesc.h.

void BcpsNodeDesc::delConstraints ( int  numDel,
int *  indices 
) [inline]

Record the constraints are deleted.

Take over the memory ownship of arguments.

Definition at line 337 of file BcpsNodeDesc.h.

void BcpsNodeDesc::addVariables ( int  numAdd,
BcpsObject **  addVars 
) [inline]

Record added variables.

Take over the memory ownship of arguments.

Definition at line 344 of file BcpsNodeDesc.h.

void BcpsNodeDesc::delVariables ( int  numDel,
int *  indices 
) [inline]

Record deleted variables.

Take over the memory ownship of arguemnts.

Definition at line 357 of file BcpsNodeDesc.h.

AlpsReturnStatus BcpsNodeDesc::encodeDblFieldMods ( AlpsEncoded encoded,
BcpsFieldListMod< double > *  field 
) const [protected]

Pack a double field into an encoded object.

AlpsReturnStatus BcpsNodeDesc::encodeIntFieldMods ( AlpsEncoded encoded,
BcpsFieldListMod< int > *  field 
) const [protected]

Pack a integer field into an encoded object.

AlpsReturnStatus BcpsNodeDesc::encodeObjectMods ( AlpsEncoded encoded,
BcpsObjectListMod objMod 
) const [protected]

Pack object modifications to an encoded object.

AlpsReturnStatus BcpsNodeDesc::decodeDblFieldMods ( AlpsEncoded encoded,
BcpsFieldListMod< double > *  field 
) [protected]

Unpack a double field from an encoded object.

AlpsReturnStatus BcpsNodeDesc::decodeIntFieldMods ( AlpsEncoded encoded,
BcpsFieldListMod< int > *  field 
) [protected]

Unpack a integer field from an encoded object.

AlpsReturnStatus BcpsNodeDesc::decodeObjectMods ( AlpsEncoded encoded,
BcpsObjectListMod objMod 
) [protected]

Unpack object modifications to an encoded object.

AlpsReturnStatus BcpsNodeDesc::encodeBcps ( AlpsEncoded encoded  )  const

Pack bcps node description into an encoded.

AlpsReturnStatus BcpsNodeDesc::decodeBcps ( AlpsEncoded encoded  ) 

Unpack bcps node description into an encoded.


Member Data Documentation

Variable objects.

Definition at line 133 of file BcpsNodeDesc.h.

Constraint objects.

Definition at line 136 of file BcpsNodeDesc.h.


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

Generated on 15 Mar 2015 for Coin-All by  doxygen 1.6.1