0

I am using jsprit to route drivers doing deliveries in time windows, with scenarios where drivers have to come back to depots multiple times.

The issue we are running into is that given a vehicle capacity of 20 parcels, and 30 parcels to be delivered, the algorithm often has the driver take 20 parcels, drop off 10, and then come back for the rest, rather than only taking the necessary 10 parcels on the first pickup. This is an issue because sometimes these items are perishable, so the less time in transit, the better.

I am thinking of adding a soft constraint or activity cost based on adding cost to a parcel in transit, but I am not sure how to do this as it seems to require heavy state-management and volume tracking. The other option would be to shift things as a post-processing step, but this does not feel clean either.

Am I missing something? Thank you!

Jay Bhat
  • 1
  • 2
  • You need to supply a repeatable example. Are you suggesting that the vehicle returns to depot immediately after freeing up capacity to take the remainder of the orders, when it would be more efficient to keep delivering some from the initial load before returning to the depot to pick up more? – roganjosh Oct 04 '16 at 18:19
  • Not exactly. The behavior I am seeing is that extra boxes are picked up in the first pickup, but not dropped off until after the second pick up, when these boxes could just as well have remained in the depot until the second pickup. – Jay Bhat Oct 12 '16 at 16:31
  • Aha, now it makes sense :) Interesting problem! Have you tried modelling this with perishable items being a `shipment` instead of a `delivery`? One in which the pickup location is the warehouse with `0` service time and the delivery location is as standard? This might _naturally_ pull things into order – roganjosh Oct 12 '16 at 16:49
  • Unfortunately, we are currently using shipments already, and jsprit seems to just frontload the cars as much as possible. What I am trying to figure out is if there is a good way to give the algorithm a notion of "perishibility". At the moment, I am working on a post-processing step to shuffle boxes, but this is sub-optimal. – Jay Bhat Oct 12 '16 at 17:23
  • Why are you using shipments as standard for this? The only viable reason I can think of is that you have a pickup --> warehouse, then warehouse --> delivery. Otherwise, it's just a delivery starting at warehouse and should be modeled as such. I only ask because I think perishability would conflict quite heavily with mileage/man-hour costs in any implementation, so we should ensure the foundation logic is correct first. – roganjosh Oct 12 '16 at 17:28
  • Is this your mailing list post? https://discuss.graphhopper.com/t/multiple-roundtrip-deliveries-from-warehouse-within-bounded-time-window/1048 – roganjosh Oct 12 '16 at 17:32
  • We are using shipments because of their additional support for time windows and service time, compared to deliveries. Also, no that is not my posting. Seems like potentially a similar problem, but I think a different solution there. Thanks! – Jay Bhat Oct 13 '16 at 15:42
  • I guess you got something from that to work on then :) Before I can consider this closed in my mind; I want to be sure you're aware that a delivery also has service time and time window attributes. I'm guessing therefore that your modelling as a shipment is to fine-tune activities at the warehouse and nothing to do with the delivery portion of the job? – roganjosh Oct 13 '16 at 18:08

0 Answers0