VRPH  1.0
Public Member Functions | Public Attributes
ClarkeWright Class Reference

#include <ClarkeWright.h>

List of all members.

Public Member Functions

 ClarkeWright (int n)
 ~ClarkeWright ()
bool Construct (class VRP *V, double lambda, bool use_neighbor_list)
void CreateSavingsMatrix (class VRP *V, double lambda, bool use_neighbor_list)

Public Attributes

class VRPSavingsElements
bool has_savings_matrix
int savings_matrix_size

Detailed Description

Definition at line 21 of file ClarkeWright.h.


Constructor & Destructor Documentation

Sets up the data structure for the Clarke Wright savings algorithm including a matrix of size n(n-1)/2 for the savings values

Definition at line 16 of file ClarkeWright.cpp.

Definition at line 29 of file ClarkeWright.cpp.


Member Function Documentation

bool ClarkeWright::Construct ( class VRP V,
double  lambda,
bool  use_neighbor_list 
)

This function constructs the routes via the Clarke Wright savings algorithm with the parameter lambda (see Yellow 19??): s_{ij}=d_{i0}+d_{0j}-lambda*d_{ij}.

Definition at line 122 of file ClarkeWright.cpp.

void ClarkeWright::CreateSavingsMatrix ( class VRP V,
double  lambda,
bool  use_neighbor_list 
)

This computes the savings matrix d[0,i]+d[0,j]-lambda*d[i,j] for all pairs (i,j) with i and j routed. Matrix is sorted and each element is of the form [val, i, j]

Definition at line 35 of file ClarkeWright.cpp.


Member Data Documentation

Definition at line 29 of file ClarkeWright.h.

Definition at line 27 of file ClarkeWright.h.

Definition at line 30 of file ClarkeWright.h.


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