|
VRPH
1.0
|
#include <ClarkeWright.h>
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 VRPSavingsElement * | s |
| bool | has_savings_matrix |
| int | savings_matrix_size |
Definition at line 21 of file ClarkeWright.h.
| ClarkeWright::ClarkeWright | ( | int | n | ) |
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.
| 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.
Definition at line 29 of file ClarkeWright.h.
| class VRPSavingsElement* ClarkeWright::s |
Definition at line 27 of file ClarkeWright.h.
Definition at line 30 of file ClarkeWright.h.
1.7.6.1