How to write CVRP (capacitated vehicle routing problem) objective function?
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Respected Sir/Madam,
Can you please help me in writing this objective function in the script?![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/422138/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/422138/image.jpeg)
0 Commenti
Risposte (1)
Yoan
il 25 Ott 2023
routeLength = @(route, distance) sum(arrayfun(@(n) distance(route(n), route(n+1)), 1:(numel(route)-1)));
0 Commenti
Vedere anche
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!