Azzera filtri
Azzera filtri

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

7 visualizzazioni (ultimi 30 giorni)
Respected Sir/Madam,
Can you please help me in writing this objective function in the script?

Risposte (1)

Yoan
Yoan il 25 Ott 2023
routeLength = @(route, distance) sum(arrayfun(@(n) distance(route(n), route(n+1)), 1:(numel(route)-1)));

Categorie

Scopri di più su Optimization in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by