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

Respuestas (1)

Yoan
Yoan el 25 de Oct. de 2023
routeLength = @(route, distance) sum(arrayfun(@(n) distance(route(n), route(n+1)), 1:(numel(route)-1)));

Categorías

Más información sobre Optimization en Centro de ayuda y File Exchange.

Preguntada:

el 21 de Nov. de 2020

Respondida:

el 25 de Oct. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by