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.64k stars 605 forks source link

added prevAct to actrivity Cost Function #527

Open waldobeest opened 3 years ago

waldobeest commented 3 years ago

Adding previousActivity to the VehicleRoutingActivityCosts function set, so that I am able to access a bit more of the context around which activities were performed before the currentActivity which may influence cost or Duration.

Current Tests are passing.

I have noticed that other constraints on my Vehicles (setEarliestDeparture and setLatestArrival) were not honored, and I needed to create a custom constraint to check them.