- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# VrpVariable Class Reference

Variable class for VRP. More...

`#include <VrpVariable.h>`

Inheritance diagram for VrpVariable:

[legend]
Collaboration diagram for VrpVariable:

[legend]
List of all members.

## Public Member Functions
| VrpVariable ()
| Default constructor.
| VrpVariable (int v1, int v2, int cost, int ub)
| Useful constructor.
virtual | ~VrpVariable ()
| Destructor.
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded)
| Pack to a encode object.
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const
| Decode a variable from an encoded object.
int | getIndex ()
| Get data.
int | getv0 ()
| Get data.
int | getv1 ()
| Get data.
## Protected Member Functions
AlpsReturnStatus | encodeVrp (AlpsEncoded *encoded)
| Pack Vrp part into an encoded object.
AlpsReturnStatus | decodeVrp (AlpsEncoded &encoded)
| Unpack Vrp part from a encode object.
## Private Attributes
int | ends_ [2]
int | uind_

## Detailed Description

Variable class for VRP.

Definition at line 25 of file VrpVariable.h.

## Constructor & Destructor Documentation

VrpVariable::VrpVariable | ( |  | ) | `[inline]`

Default constructor.

Definition at line 64 of file VrpVariable.h.

References ends_.

Referenced by decode().

VrpVariable::VrpVariable | ( | int | v1,
|  | int | v2,
|  | int | cost,
|  | int | ub |
| ) |  |  | `[inline]`

Useful constructor.

Definition at line 70 of file VrpVariable.h.

References ends_, BlisVariable::setData(), BcpsObject::setIntType(), BcpsObject::setLbHard(), BlisVariable::setObjCoef(), BcpsObject::setUbHard(), and uind_.

virtual VrpVariable::~VrpVariable | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 87 of file VrpVariable.h.

## Member Function Documentation

AlpsReturnStatus VrpVariable::encodeVrp | ( | AlpsEncoded * | encoded | ) | `[inline, protected]`

Pack Vrp part into an encoded object.

Definition at line 36 of file VrpVariable.h.

References AlpsReturnStatusOk, ends_, uind_, and AlpsEncoded::writeRep().

Referenced by encode().

AlpsReturnStatus VrpVariable::decodeVrp | ( | AlpsEncoded & | encoded | ) | `[inline, protected]`

Unpack Vrp part from a encode object.

Definition at line 49 of file VrpVariable.h.

References AlpsReturnStatusOk, ends_, AlpsEncoded::readRep(), and uind_.

Referenced by decode().

int VrpVariable::getIndex | ( |  | ) | `[inline]`

Get data.

Definition at line 93 of file VrpVariable.h.

References uind_.

int VrpVariable::getv0 | ( |  | ) | `[inline]`

Get data.

Definition at line 94 of file VrpVariable.h.

References ends_.

int VrpVariable::getv1 | ( |  | ) | `[inline]`

Get data.

Definition at line 95 of file VrpVariable.h.

References ends_.

virtual AlpsReturnStatus VrpVariable::encode | ( | AlpsEncoded * | encoded | ) | `[inline, virtual]`

Pack to a encode object.

Reimplemented from BlisVariable.

Definition at line 99 of file VrpVariable.h.

References BcpsObject::encodeBcpsObject(), BlisVariable::encodeBlis(), and encodeVrp().

virtual AlpsKnowledge* VrpVariable::decode | ( | AlpsEncoded & | encoded | ) | const`[inline, virtual]`

Decode a variable from an encoded object.

Reimplemented from BlisVariable.

Definition at line 110 of file VrpVariable.h.

References AlpsReturnStatusOk, BcpsObject::decodeBcpsObject(), BlisVariable::decodeBlis(), decodeVrp(), and VrpVariable().

## Member Data Documentation

int VrpVariable::ends_[2]`[private]`

Definition at line 30 of file VrpVariable.h.

Referenced by decodeVrp(), encodeVrp(), getv0(), getv1(), and VrpVariable().

int VrpVariable::uind_`[private]`

Definition at line 31 of file VrpVariable.h.

Referenced by decodeVrp(), encodeVrp(), getIndex(), and VrpVariable().

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

- /home/coin/SVN-release/Blis-0.91.0/Blis/examples/VRP/VrpVariable.h