Parallel savings heuristic from depot 1: pairs are merged in decreasing
s_ij = d_1i + d_1j - d_ij when both are route ends and the load fits.
Usage
VehicleRoutingSavings(demand, capacity, points = NULL, dist = NULL)
Arguments
- demand
Demand per node (entry 1, the depot, ignored).
- capacity
Vehicle capacity.
- points
Coordinate matrix, or NULL.
- dist
Distance matrix, or NULL.
Value
list(routes (1-based customer vectors), loads, length, route_lengths).
References
Clarke, G. and Wright, J. W. (1964). Scheduling of vehicles from
a central depot to a number of delivery points. Operations Research 12,
568-581.
Examples
VehicleRoutingSavings(c(0, 1, 1, 1), 2, rbind(c(0, 0), c(1, 0), c(2, 0), c(0, 5)))$routes
#> [[1]]
#> [1] 2 3
#>
#> [[2]]
#> [1] 4
#>