demand <- c(3, 2, 4, 2)
positions <-
data.frame(
pos_x = c(0, 1, -1, 2, 3),
pos_y = c(0, 1, 1, 2, 3)
)
solution <- clarke_wright(
demand,
dist(positions),
data.frame(n = NA_integer_, caps = 6)
)
milkr_cost(solution)
Run the code above in your browser using DataLab