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

Priority management for delivery first and pickup last #803

Closed
TEMAROUTE opened this issue Oct 12, 2022 · 4 comments
Closed

Priority management for delivery first and pickup last #803

TEMAROUTE opened this issue Oct 12, 2022 · 4 comments
Labels

Comments

@TEMAROUTE
Copy link

I am trying to solve routes for which i am submitting a list of jobs having both deliveries and pickup. Sometimes, the deliveries and pickup are for same locations, sometimes, they are distinct locations. Setting higher PRIORITY for DELIVERY and lower priority for PICKUP, I would expect the SOLVER to return ROUTES where deliveries are always processed first (routes with deliveries in first sequences...). But this does not seem to work with usage of PRIORITY. Any feedback on how to resolve some jobs first would be hight appreciated. Thanks.

@jcoupey
Copy link
Collaborator

jcoupey commented Oct 13, 2022

Tasks priority is not about timing, see the docs explanation.

There is currently no other way to achieve this than setting different TW for delivery and pickup jobs. The good news is that once #786 is implemented, you should be able to trick VROOM into inserting a low-load break in the middle of the route, resulting in (most) deliveries happening before the break and (most) pickups after.

@aardvarkk
Copy link
Contributor

@jcoupey I'm also interested in being able to model this sort of problem in VROOM ("all deliveries before any pickups").

I had two questions:

  1. It sounds like you're recommending the best approach to modeling this in the current version would be to manipulate time windows for deliveries and pickups to try to have them temporally separate. So the idea would be a kind of "meta optimization" where the user would run the optimization several times while tweaking that "break point" timing (the time window close for any delivery and the time window open for any pickup in this case) until, ideally, all stops were included and all deliveries took place before all pickups. Do you think that's the best way to accomplish this at the moment?

  2. In the future, how do you imagine something like this being modeled in the optimizer (if at all)? It feels like the request in its most general form is to model dependencies between jobs. So job A might be able to say, "place me strictly before jobs [B, C, D]", and so on. Were this to be implemented, wouldn't such requirements potentially speed up the optimization by limiting the search space to only a subset of possibilities? I could take a look at what an implementation might look like if you were able to guide me towards some appropriate sections in the code where the changes might be placed.

@jcoupey
Copy link
Collaborator

jcoupey commented Nov 9, 2022

Do you think that's the best way to accomplish this at the moment?

Yes, but that is not very convenient nor flexible.

In the future, how do you imagine something like this being modeled in the optimizer (if at all)?

My previous comment was probably not clear enough: if we have the ability to force a max_load value on breaks, then you can create a break with an empty max_load. This means that no pickup won't be possible until all deliveries are performed, or else the route would not be valid since the break wouldn't fit anywhere.

This is how I intend to model VRPB (vehicle routing problem with backhauls) instances from the literature. As opposed to linehauls (regular deliveries from the depot), backhauls are pickups that need to be brought back at the end of the route and the VRPB problem description states that backhauls should only happen after linehauls in a route.

@jcoupey
Copy link
Collaborator

jcoupey commented Jan 3, 2023

Closing as the modeling explained in my previous comment is now a thing in the v1.13 release candidates. See previous link and the VRPB instances for more.

@jcoupey jcoupey closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants