How to write CVRP (capacitated vehicle routing problem) objective function?
古いコメントを表示
Respected Sir/Madam,
Can you please help me in writing this objective function in the script?

回答 (1 件)
Yoan
2023 年 10 月 25 日
0 投票
routeLength = @(route, distance) sum(arrayfun(@(n) distance(route(n), route(n+1)), 1:(numel(route)-1)));
カテゴリ
ヘルプ センター および File Exchange で Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!