How to write CVRP (capacitated vehicle routing problem) objective function?

回答(1 个)

routeLength = @(route, distance) sum(arrayfun(@(n) distance(route(n), route(n+1)), 1:(numel(route)-1)));

类别

帮助中心File Exchange 中查找有关 Optimization 的更多信息

回答:

2023-10-25

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by