15 #ifndef VrpVariable_h_
16 #define VrpVariable_h_
20 #include "BlisVariable.h"
71 ends_[0] = v1 < v2 ? v1 : v2;
72 ends_[1] = v1 < v2 ? v2 : v1;
76 indices[0] =
ends_[0];
77 indices[1] =
ends_[1];
78 values[0] = values[1] = 1.0;
99 std::cout <<
"(" <<
getv0() <<
", " <<
getv1() <<
")";
121 throw CoinError(
"Failed to decode Bcps part of var",
129 throw CoinError(
"Failed to decode Blis part of var",
137 throw CoinError(
"Failed to decode Vrp part of var",
void setUbHard(double ub)
Set the appropriate property.
AlpsEncoded & readRep(T &value)
Read a single object of type T from repsentation_ .
AlpsEncoded & writeRep(const T &value)
Write a single object of type T in repsentation_ .
virtual ~VrpVariable()
Destructor.
AlpsReturnStatus decodeBlis(AlpsEncoded &encoded)
Unpack Blis part from a encode object.
virtual AlpsReturnStatus encode(AlpsEncoded *encoded)
Pack to a encode object.
This data structure is to contain the packed form of an encodable knowledge.
VrpVariable(int v1, int v2, int cost, int ub)
Useful constructor.
AlpsReturnStatus decodeVrp(AlpsEncoded &encoded)
Unpack Vrp part from a encode object.
void setObjCoef(double coef)
Set data.
virtual AlpsKnowledge * decode(AlpsEncoded &encoded) const
Decode a variable from an encoded object.
AlpsReturnStatus encodeBlis(AlpsEncoded *encoded)
Pack Blis part into an encoded object.
AlpsReturnStatus encodeBcpsObject(AlpsEncoded *encoded) const
Pack Bcps part to a encode object.
void setData(int s, const int *ind, const double *val)
Set data.
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...
VrpVariable()
Default constructor.
void setIntType(BcpsIntegral_t it)
Set the appropriate property.
AlpsReturnStatus encodeVrp(AlpsEncoded *encoded)
Pack Vrp part into an encoded object.
Error Class thrown by an exception.
AlpsReturnStatus decodeBcpsObject(AlpsEncoded &encoded)
Unpack Bcps part from a encode object.
void setLbHard(double lb)
Set the appropriate property.