graphhopper / jsprit

jsprit is a java based, open source toolkit for solving rich vehicle routing problems
https://www.graphhopper.com/open-source/
Apache License 2.0
1.63k stars 604 forks source link

Distance/duration constraint #540

Closed teastares closed 2 years ago

teastares commented 2 years ago

Is there any way we can constraint the total distance or duration for every route/vehicle?

rewertvsp commented 2 years ago

Hi, using MATSim with the extension of jsprit we developed a distance constraint. The published paper you can find here: https://doi.org/10.1016/j.trpro.2021.01.061 With this constraint you can set a max distance for each vehicle type. The code is part of the freight extension of MATSim and can be found here: https://github.com/matsim-org/matsim-libs/tree/master/contribs/freight/src/main/java/org/matsim/contrib/freight/jsprit If you have questions dont hestitate to ask.

oblonski commented 2 years ago

https://github.com/graphhopper/jsprit/blob/master/jsprit-core/src/main/java/com/graphhopper/jsprit/core/problem/constraint/MaxDistanceConstraint.java