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

Steps of pickup and delivery? #1209

Open
jimfrakt24 opened this issue Jan 9, 2025 · 7 comments
Open

Steps of pickup and delivery? #1209

jimfrakt24 opened this issue Jan 9, 2025 · 7 comments
Labels

Comments

@jimfrakt24
Copy link

jimfrakt24 commented Jan 9, 2025

Hello VROOM team, I have a challenge that I’m wondering if VROOM is capable of solving. For example, I have 4 orders that I want to optimize for the fastest and most efficient route. Each order has 1 pickup and 1 delivery, and we can call them orders 1, 2, 3, and 4. Is there any way to set it so that order 2 must be delivered before order 3 can be picked up?

@jimfrakt24 jimfrakt24 changed the title Hello VROOM team Steps of pickup and delivery? Jan 9, 2025
@jcoupey
Copy link
Collaborator

jcoupey commented Jan 10, 2025

No there is no way to set precedence constraints on shipments or jobs. See #581 for some more context.

@jimfrakt24
Copy link
Author

Is this something that someone have looked more into or thinking of extending on VROOM? Someone mentioned an idea of subsequence of deliveries/jobs. We would be very interested in adding such functionality.

@jcoupey
Copy link
Collaborator

jcoupey commented Jan 13, 2025

Outside the discussions mentioned here, I've had no clue so far that this would be very useful for our customers. I'm not saying this is not interesting (I'd need to get more info on use-cases), but this has not been given much consideration so far.

@jimfrakt24
Copy link
Author

jimfrakt24 commented Jan 13, 2025 via email

@jcoupey
Copy link
Collaborator

jcoupey commented Jan 14, 2025

You example is only using jobs. If you have pickup & delivery constraints then you would get a better description of your problem by using shipments.

@jimfrakt24
Copy link
Author

Yes as I mentioned using jobs will not work.

Here is one using shipments. Where I created a job to get he skip that was emptied at the recycle facility location back on the vehicle. This works as long as there is only one location I'm going to pick up a skip and drive to empty it. Is I add more shipment from locations to recycle facility and create a job for adding the skip back on the vehicle it will do all the jobs ut to the vehicle capacity every time the vehicle is at the location for recycle facility.

Capacity on the vehicle is [5,1] (5 empty skips and 1 full)

So if there was a way to say that job id: 5002 have to be completed after id: 6, this would have worked beautifully :)
Difficult to explain but hope this makes sense :)

{
"vehicles": [
{
"id": 70,
"profile": "car",
"start": [
2.35044,
48.71764
],
"end": [
2.35044,
48.71764
],
"capacity": [
5,
1
],
"skills": []
}
],
"jobs": [
{
"service": 300,
"id": 5002,
"skills": [],
"location": [
2.03655,
48.61128
],
"description": "Pickup empty skip at recycle facility. (The one that was emptied id:6)",
"pickup": [
1,
0
]
}
],
"shipments": [
{
"amount": [
1,
0
],
"pickup": {
"description": "Pickup empty skip",
"id": 1,
"service": 300,
"location": [
2.35044,
48.71764
]
},
"delivery": {
"description": "Deliver empty skip",
"id": 2,
"service": 300,
"location": [
2.39719,
49.07611
]
}
},
{
"amount": [
1,
0
],
"pickup": {
"description": "Pickup empty skip",
"id": 3,
"service": 300,
"location": [
2.35044,
48.71764
]
},
"delivery": {
"description": "Deliver empty skip and pickup full",
"id": 4,
"service": 300,
"location": [
2.89357,
48.90736
]
}
},
{
"amount": [
0,
1
],
"pickup": {
"description": "Pickup full skip",
"id": 5,
"service": 300,
"location": [
2.89357,
48.90736
]
},
"delivery": {
"description": "Deliver full skip to recycle facility",
"id": 6,
"service": 300,
"location": [
2.03655,
48.61128
]
}
}
]
}

@jcoupey
Copy link
Collaborator

jcoupey commented Jan 20, 2025

Not sure I actually grasp all the details of the use-case but since you're always picking things at different locations to bring them somewhere else (either for delivering or emptying), I think you should always be using shipments, and never have jobs in your model.

I'm not saying using only shipments will solve the problem if there are still precedence constraints between shipments, just that jobs do not seem to make sense in your context.

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

2 participants