Description Usage Arguments Examples
To find near optimal solutions using Simmulated Annealing.
1 2 |
fitness |
Fitness function |
vc |
Vehicle capacity |
demand |
Demand at each node |
method |
– Metric to calculate distnace between nodes. Feasible methods for X-Y co-ordinates c("euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski"); Feasible methods for Long-Lat c(distCosine, distHaversine). Default: "euclidean". Note: Please make sure that, method should be character for X-Y co-ordinates and not for Long-Lat. |
popSize |
Population Size |
nrun |
Number of runs |
location |
Location of each node |
1 2 3 4 5 6 7 8 9 10 11 | popSize <- 100
num_nodes <- 31
fitness <- fitness
vc <- 100
Demand <- An32k5demand
Locations <- An32k5locations
DMat <- DistMat(locations)
row.names(DMat) <- c(0, 1:(nrow(demand)-1))
colnames(DMat) <- c(0, 1:(nrow(demand)-1))
SA_VRP(fitness, vc, demand, locations, popSize = 100)
SA_VRP(fitness, vc, demand, locations)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.