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
Yoan 2023 年 10 月 25 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeOptimization についてさらに検索

質問済み:

2020 年 11 月 21 日

回答済み:

2023 年 10 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by