Hi all!
I started using JSprit very recently, although I’m a bit familiar with the Route Optimization API. And, for a new project, I’m trying to replicate some of its behavior (since I can’t use the paid API for it).
Context
The service I created runs as a DropWizard application, and I’m using a VehicleRoutingTransportCosts
that gets the distances and times from an embedded GraphHopper with OSM maps. Other than that, I’m using all the defaults. Nothing out of the ordinary.
The problem
I have to optimize a few shipments, let’s say P-S (pickup-delivery), P-S, P-S, S-P, starting in P and finishing wherever the optimizer decides is best. Capacities and sizes are fine (ie, the vehicle has more capacity than the combined sizes of the shipments).
When I run the optimization, I get
- Start in S
- Pickup in in P
- Delivery in S
- Pickup in in P
- Delivery in S
- Pickup in S
- Delivery in P
- Pickup in P
- Delivery in S
- End in S
(that’s 6 trips)
Instead of a more reasonable
- Start in S
- Pickup n S
- Pickup in P
- Pickup in P
- Pickup in P
- Delivery in P
- Delivery in S
- Delivery in S
- Delivery in S
- End in S
(that’s 2 trips, which I got from GraphHopper-aaS, using the minimize completion time objective)
My result is clearly wasteful.
My question would then be, what am I missing that is preventing my solution to be “better”, like the one from GHaaS?