Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Trips for each vehicle #50

Open
sandeepravi opened this issue Apr 8, 2019 · 4 comments
Open

Multiple Trips for each vehicle #50

sandeepravi opened this issue Apr 8, 2019 · 4 comments

Comments

@sandeepravi
Copy link

This is a pretty wonderful tool!

I was trying to model a pickup and delivery problem. But it looks like the vehicles don't take multiple trips. After it completes one drop, it doesn't try to find the next trip.

Is there a way to model this?

@PGWelch
Copy link
Owner

PGWelch commented Apr 12, 2019

You should try linked pickup-delivery jobs - these involve moving something from one location (linked pickup stop) to another location (linked delivery stop), where neither is the vehicle start/end location. Both stops need the same jobid. In the demo data creator, tick the option to create some linked pickup-delivery to see their data format (look for the stops with stop type LP and LD and same job id). The pickup and delivery can have separate time windows (open time and close time).

@mjzwick
Copy link

mjzwick commented Mar 2, 2022

If your scenario is to do multiple delivery runs from a depot per day, then I find this technique can yield very odd results, such as trucks going out full and delivering 2/3 of their load and returning to top off the truck capacity at the depot and again not delivering the whole load, until of course the last run of the day. Maybe this makes mathematical sense, but it doesn't make intuitive sense.

@PGWelch
Copy link
Owner

PGWelch commented Mar 2, 2022

Yes that can happen. Our commercial route optimiser engine ODL Live uses a different algorithm internally, and so it has an option to fix this but ODL Studio just uses jsprit internally though, so it unfortunately doesn't have that option.

The issue as you say is the maths, it's the same cost for the optimiser to pickup on the first pass or the second, even if it's not delivering until the second.

The workaround for yourself is to take the solution ODL Studio gives you, and then just rejig it so that every pickup at the depot is done on the pass before its delivered.

i.e. if ODL Studio gives you:

Pickup1
Pickup2
Pickup3
Deliver1
Deliver2
Pickup4
Deliver3
Deliver4

when you use it in real-life, just re-write it as:

FillUpAtDepot
Deliver1
Deliver2
FillUpAtDepot
Deliver3
Deliver4

i.e. ignore when ODL Studio says to do the pickup and just use when it says to the deliveries, and when to go back to depot. The number will work out the same (i.e. you won't blow the capacity).

@mjzwick
Copy link

mjzwick commented Mar 3, 2022

Not sure that actually solves the issue. Let's say you have a truck capacity of 40, and you have 500 items to deliver. If you use linked pickup (LP, at depot) and linked deliveries (LD), the solution may come back:

Pickup 1 (20 items) [at depot]
Pickup 2 (10 items) [at depot]
Pickup 3 (5 items) [at depot]
Pickup 4 (15 items) [at depot]
Deliver 1 (20 items)
Deliver 3 (5 items)
Pickup 5 (25 items) [at depot]
etc.

This means not completely unloading the truck before coming back to the depot for more items. I have attached an example from one of our delivery years with the troop for one of the trucks to illustrate.
Screen Shot 2022-03-03 at 8 38 25 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants