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

add activities to job interface #476

Closed oblonski closed 5 years ago

oblonski commented 5 years ago

This allows the user to easily retrieve job related information without always turning the job into either a service or a shipment, i.e. we get rid of a number of "instanceof Shipment" stuff.

oblonski commented 5 years ago

https://github.com/graphhopper/jsprit/commit/dd3f29b5cc8c6f525ccd617880b1f8fb0a1bb3d9 and related commits

oblonski commented 5 years ago

This and this illustrates the improvement.

quiqua commented 5 years ago

This and this illustrates the improvement.

That looks great! :)

oblonski commented 5 years ago

... and it should not break anything even though it is defined in job interface since the job interface is actually a Schummelinterface, i.e. if you want to solve a problem with jsprit, you need to either use Service or Shipment and you are not yet allowed to implement your own job - as far as I can judge it now.