VrpModel Class Reference

Model class for VRP. More...

#include <VrpModel.h>

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

List of all members.

Public Member Functions

 VrpModel ()
 Default construtor.
virtual ~VrpModel ()
 Destructor.
virtual void readInstance (const char *dateFile)
 For parallel code, only the master calls this function.
virtual void readParameters (const int argnum, const char *const *arglist)
 Read in Alps, Blis, Vrp parameters.
virtual BlisSolutionuserFeasibleSolution (const double *solution, bool &userFeasible)
 User's criteria for a feasible solution.
int index (int v0, int v1)
int computeCost (int v0, int v1)
int getNumVertices ()
int getNumEdges ()
std::vector< VrpVariable * > getEdgeList ()
CoinPackedVectorgetSolution (const double *denseSol)
void createNet (CoinPackedVector *vec)
virtual void registerKnowledge ()
 Register knowledge.
AlpsReturnStatus encodeVrp (AlpsEncoded *encoded) const
 Pack Vrp portion of the model into an encoded object.
AlpsReturnStatus decodeVrp (AlpsEncoded &encoded)
 Unpack Vrp portion of the model from an encoded object.
virtual AlpsEncodedencode () const
 The method that encodes the model into an encoded object.
virtual void decodeToSelf (AlpsEncoded &)
 The method that decodes the model from an encoded object.

Protected Member Functions

void setModelData ()
 1) Set colMatrix_, varLB_, varUB_, conLB_, conUB, numCols_, numRows_ 2) Set objCoef_ and objSense_ 3) Set colType_ ('C', 'I', or 'B')

Private Attributes

char name_ [100]
int vertnum_
int edgenum_
int numroutes_
int depot_
int capacity_
int wtype_
int * demand_
int * posx_
int * posy_
double * coordx_
double * coordy_
double * coordz_
double etol_
VrpParamsVrpPar_
VrpNetworkn_
std::vector< VrpVariable * > edges_

Friends

class VrpCutGenerator
class VrpSolution

Detailed Description

Model class for VRP.

Definition at line 32 of file VrpModel.h.


Constructor & Destructor Documentation

VrpModel::VrpModel (  )  [inline]

Default construtor.

Definition at line 73 of file VrpModel.h.

virtual VrpModel::~VrpModel (  )  [inline, virtual]

Destructor.

Definition at line 116 of file VrpModel.h.


Member Function Documentation

void VrpModel::setModelData (  )  [protected]

1) Set colMatrix_, varLB_, varUB_, conLB_, conUB, numCols_, numRows_ 2) Set objCoef_ and objSense_ 3) Set colType_ ('C', 'I', or 'B')

virtual void VrpModel::readInstance ( const char *  dateFile  )  [virtual]

For parallel code, only the master calls this function.

1) Read in the instance data 2) Set colMatrix_, varLB_, varUB_, conLB_, conUB numCols_, numRows_ 3) Set objCoef_ and objSense_ 4) Set colType_ ('C', 'I', or 'B') 5) Create variables and constraints 6) Set numCoreVariables_ and numCoreConstraints_

Reimplemented from BlisModel.

virtual void VrpModel::readParameters ( const int  argnum,
const char *const *  arglist 
) [virtual]

Read in Alps, Blis, Vrp parameters.

Reimplemented from BlisModel.

virtual BlisSolution* VrpModel::userFeasibleSolution ( const double *  solution,
bool &  userFeasible 
) [virtual]

User's criteria for a feasible solution.

If user think the given solution is feasible then need 1) set userFeasible to true, and 2) return a non-null VRP solution. If user think the solution is infeasible then need 1) set userFeasible to false, and 2) return a null.

Reimplemented from BlisModel.

int VrpModel::index ( int  v0,
int  v1 
) [inline]

Definition at line 152 of file VrpModel.h.

int VrpModel::computeCost ( int  v0,
int  v1 
)
int VrpModel::getNumVertices (  )  [inline]

Definition at line 158 of file VrpModel.h.

int VrpModel::getNumEdges (  )  [inline]

Definition at line 160 of file VrpModel.h.

std::vector<VrpVariable *> VrpModel::getEdgeList (  )  [inline]

Definition at line 162 of file VrpModel.h.

CoinPackedVector* VrpModel::getSolution ( const double *  denseSol  ) 
void VrpModel::createNet ( CoinPackedVector vec  ) 
virtual void VrpModel::registerKnowledge (  )  [virtual]

Register knowledge.

Reimplemented from BlisModel.

AlpsReturnStatus VrpModel::encodeVrp ( AlpsEncoded encoded  )  const

Pack Vrp portion of the model into an encoded object.

AlpsReturnStatus VrpModel::decodeVrp ( AlpsEncoded encoded  ) 

Unpack Vrp portion of the model from an encoded object.

virtual AlpsEncoded* VrpModel::encode (  )  const [virtual]

The method that encodes the model into an encoded object.

Reimplemented from BlisModel.

virtual void VrpModel::decodeToSelf ( AlpsEncoded  )  [virtual]

The method that decodes the model from an encoded object.

Reimplemented from BlisModel.


Friends And Related Function Documentation

friend class VrpCutGenerator [friend]

Definition at line 35 of file VrpModel.h.

friend class VrpSolution [friend]

Definition at line 36 of file VrpModel.h.


Member Data Documentation

char VrpModel::name_[100] [private]

Definition at line 40 of file VrpModel.h.

int VrpModel::vertnum_ [private]

Definition at line 41 of file VrpModel.h.

int VrpModel::edgenum_ [private]

Definition at line 42 of file VrpModel.h.

int VrpModel::numroutes_ [private]

Definition at line 43 of file VrpModel.h.

int VrpModel::depot_ [private]

Definition at line 44 of file VrpModel.h.

int VrpModel::capacity_ [private]

Definition at line 45 of file VrpModel.h.

int VrpModel::wtype_ [private]

Definition at line 46 of file VrpModel.h.

int* VrpModel::demand_ [private]

Definition at line 47 of file VrpModel.h.

int* VrpModel::posx_ [private]

Definition at line 48 of file VrpModel.h.

int* VrpModel::posy_ [private]

Definition at line 49 of file VrpModel.h.

double* VrpModel::coordx_ [private]

Definition at line 50 of file VrpModel.h.

double* VrpModel::coordy_ [private]

Definition at line 51 of file VrpModel.h.

double* VrpModel::coordz_ [private]

Definition at line 52 of file VrpModel.h.

double VrpModel::etol_ [private]

Definition at line 53 of file VrpModel.h.

Definition at line 55 of file VrpModel.h.

Definition at line 56 of file VrpModel.h.

std::vector<VrpVariable *> VrpModel::edges_ [private]

Definition at line 60 of file VrpModel.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