eoVRPUtils Namespace Reference

A set of structures and utility functions for the VRP-TW problem. More...


Classes

struct  ClientData
 Information regarding each client in the dataset. More...

Typedefs

typedef eoVRPUtils::ClientData ClientDataT
 Renaming of struct ClientData.

Functions

void computeDistances ()
 Computes the distance between two clients.
void getTimeWindow (unsigned _client, double &_readyTime, double &_dueTime, double &_serviceTime)
 Returns the time window information of a given client.
float distance (unsigned _from, unsigned _to)
 A function to get the distance between two clients.
float polarAngle (unsigned _from, unsigned _to)
 Computes de polar angle between clients.
void load (const char *_fileName)
 Loads the problem data from a given file.
void printRoute (const Route &_route)
 Prints a route to the standard output.
void printRoutes (Routes &_routes)
 Prints a set of routes to the standard output.

Variables

static std::vector< ClientDataTclients
 Vector to store clients's information.
static std::vector< std::vector<
double > > 
dist
 Distance matrix.


Detailed Description

A set of structures and utility functions for the VRP-TW problem.

Function Documentation

void eoVRPUtils::computeDistances (  ) 

Computes the distance between two clients.

The computed distances will be stored in dist.

Definition at line 108 of file eoVRPUtils.h.

References clients, and dist.

Referenced by load().

void eoVRPUtils::getTimeWindow ( unsigned  _client,
double &  _readyTime,
double &  _dueTime,
double &  _serviceTime 
)

Returns the time window information of a given client.

Parameters:
_client The client whose information we want to know.
_readyTime Return value. The beginning of the client's time window.
_dueTime Return value. The end of the client's time window.
_serviceTime Return value. The client's service time.

Definition at line 139 of file eoVRPUtils.h.

References clients.

Referenced by eoVRP::decode(), and eoVRPInit::evaluateInsertion().

float eoVRPUtils::distance ( unsigned  _from,
unsigned  _to 
)

A function to get the distance between two clients.

Parameters:
_from The first client.
_to The second client.
Returns:
The distance between _from and _to.

Definition at line 157 of file eoVRPUtils.h.

References clients, and dist.

Referenced by eoVRP::decode(), eoVRPInit::evaluateInsertion(), eoVRPInit::selectBestClientAsSeed(), eoVRPInit::selectCheapestClient(), and eoVRPInit::selectFarthestClientAsSeed().

float eoVRPUtils::polarAngle ( unsigned  _from,
unsigned  _to 
)

Computes de polar angle between clients.

Parameters:
_from The first client.
_to The second client.
Returns:
The polar angle between _from and _to.

Definition at line 174 of file eoVRPUtils.h.

References clients.

Referenced by eoVRPInit::selectCheapestClient().

void eoVRPUtils::load ( const char *  _fileName  ) 

Loads the problem data from a given file.

Parameters:
_fileName The file to load data from.
Warning:
No error check is performed!

Definition at line 199 of file eoVRPUtils.h.

References clients, and computeDistances().

void eoVRPUtils::printRoute ( const Route &  _route  ) 

Prints a route to the standard output.

Parameters:
_route The route to print.

Definition at line 241 of file eoVRPUtils.h.

void eoVRPUtils::printRoutes ( Routes &  _routes  ) 

Prints a set of routes to the standard output.

Parameters:
_routes The set of routes to print.

Definition at line 264 of file eoVRPUtils.h.


Generated on Fri Dec 7 16:57:20 2007 for CVRP-TW by  doxygen 1.4.7