How to write CVRP (capacitated vehicle routing problem) objective function?
3 views (last 30 days)
Show older comments
Respected Sir/Madam,
Can you please help me in writing this objective function in the script?
0 Comments
Answers (1)
Yoan
on 25 Oct 2023
routeLength = @(route, distance) sum(arrayfun(@(n) distance(route(n), route(n+1)), 1:(numel(route)-1)));
0 Comments
See Also
Categories
Find more on Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!