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

CVRP with pickUp and Delivery and period of planning more than one day #1366

Closed
RihabGorsan opened this issue Jun 19, 2019 · 2 comments
Closed
Assignees
Labels
Help Needed Modeling/Usage problem Solver: Routing Uses the Routing library and the original CP solver
Milestone

Comments

@RihabGorsan
Copy link

Hi everyone,
I am working on a problem of CVRP with pickup and delivery and time window. I have only time window constraints on the delivery date (not the pickup).
The issue I am facing is that in the data fed to the solver I have some missions whose time window is for example at day time x hour y minutes day 27-11-2018 and others at x hour y minutes day 28-11-2018 the day after. So the period of planning is 2 days. Note that I set time horizon to 48 hour period in the time dimension, convert all time windows to seconds and that a vehicle can do multi-trips.
In the solution given by the solver, there are some routes where demands that need to be delivered at day 28 are scheduled before demands that need to be delivered at day 27 for the same vehicle. Not logic at all!
I made sure that all time widows are well set and that they include the information of the day (e.g 08:45:23 1day, this means it needs to occur on day 28 at 08:45:23)
It seems that the solver is not taking into consideration the day given in the time window or maybe when it starts to accumulate time for the route it doesn’t care about the day ...? Could anyone point me out how to address this issue or is there something that I am not aware of in the case of VRP with a period of planing more than one day?
Thank you!

@lperron lperron added Help Needed Modeling/Usage problem Solver: Routing Uses the Routing library and the original CP solver labels Jun 20, 2019
@jmarca
Copy link
Contributor

jmarca commented Jul 16, 2019

It is hard to say what is going on without seeing some code...but some thoughts:

Time is tricky. I always use a library for time, and convert to seconds or milliseconds in my code, using the library to switch back to real dates later. Whenever I touch time and I think I can get away without using a library, I usually get burned.

So convert your days : hours : minutes : seconds to seconds. Then there can be no doubt that time windows for day 2 are greater than time windows on day 1, and you can begin to debug whether it is a solver issue (unlikely) or a logic or constraint issue.

But without a bit of code, hard to help.

@lperron
Copy link
Collaborator

lperron commented Aug 7, 2019

And don't convert to seconds, minutes is good too, and easier on the solver.

@lperron lperron closed this as completed Sep 8, 2019
@Mizux Mizux self-assigned this Oct 26, 2020
@Mizux Mizux added this to the v8.0 milestone Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Needed Modeling/Usage problem Solver: Routing Uses the Routing library and the original CP solver
Projects
None yet
Development

No branches or pull requests

4 participants