2

Does anyone know if the jsprit solvers use a 'as the crow flies' geometric distance between two points in a route by default? And if so, is it possible to constrain this by providing to jsprit as parameters pre-calculated times/distance between adjacent points, as provided by e.g. a Google Directions calculation?

This is to allow for classic problems such as the true distance between two points could be much further than the straight-line distance if the real world journey was from one side of an estuary without a bridge being available etc?

4

1 回答 1

6

By default jsprit uses euclidean distances or as you put it 'as the crow fly' distances. If you want to consider your own distance measure, just implement VehicleRoutingTransportCosts. Assign it when building your vehicle routing problem with .setRoutingCosts(..). If you have a time and/or distance matrix, you can also use this.

于 2015-10-13T12:54:33.157 回答