Pick and Delivery VRP - Hard constraints

616 views
Skip to first unread message

ma...@schmidt-seb.de

unread,
Oct 7, 2017, 1:32:20 PM10/7/17
to OptaPlanner development
Hi there,

I'm implementing what is essentially a Vehicle Routing Problem with pick-up and delivery. The vehicle will pick-up packages and deliver them to other locations along the route. Hence, around half of the search-space is invalid as we can't deliver a package which hasn't been picked up before and is not loaded in the vehicle. 

I tried to implement that constraint by providing ValueRangeProvider on PlanningEntity level, but that didn't work because it doesn't seem to be supported with chained entities. 

What would be the Optaplanner-way to implement such a restriction in an efficient manner? 

Cheers,

Sebastian

Eugene Shvartsman

unread,
Oct 9, 2017, 5:43:06 PM10/9/17
to OptaPlanner development

Geoffrey De Smet

unread,
Oct 12, 2017, 2:38:46 AM10/12/17
to optapla...@googlegroups.com

For what it's worth.

Due to a customer request, I 've been focusing on better support for mixed pickup and delivery vehicle routing problem.
Benchmarking different poc's with OptaPlanner shows interesting results:
- a vanilla "just add constraints" implementation looked good originally.
- until I compared it to a "add custom smart moves" implementation that completely dwarfs it.
See my twitter tweet about the benchmark results later today.

Due to priorities, it will take some time for this to materialize in generic upstream:
That custom move code is domain specific and still complex to use correctly.
And I don't want it to proliferate through the community in its current state anyway.

With kind regards,
Geoffrey De Smet

--
You received this message because you are subscribed to the Google Groups "OptaPlanner development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optaplanner-d...@googlegroups.com.
To post to this group, send email to optapla...@googlegroups.com.
Visit this group at https://groups.google.com/group/optaplanner-dev.
For more options, visit https://groups.google.com/d/optout.

dav...@hawkeyelogs.com

unread,
Jul 2, 2018, 1:25:30 PM7/2/18
to OptaPlanner development
Hi Sebastian,

Did you find the way to deal with such kind of problem, VRP with pickup and delivery constraints? My research focuses on it.

Could you have some idea? Thank you very much.

David

Geoffrey De Smet

unread,
Jul 3, 2018, 10:52:00 AM7/3/18
to optapla...@googlegroups.com

With kind regards,
Geoffrey De Smet

--

David Z

unread,
Jul 3, 2018, 12:29:33 PM7/3/18
to optapla...@googlegroups.com
Hi Geoffery,

Thank you for your reply.

My question is to obtain solutions for pickup and delivery problem with precedence constraints. For example, there are four loads needed to pick up from four origins, then deliver to four destinations. The only constraint is the order of pick up and delivery for each load. No order among loads. It likes: P1, P2,D1, P3, D3,P4,D2,D4. Could you have some ideas for this kind of problem? Thank you very much.

David

On Tue, Jul 3, 2018 at 7:51 AM, Geoffrey De Smet <gds.geoffr...@gmail.com> wrote:

Here be dragons, but it works:
  https://github.com/ge0ffrey/optaplanner-mixedvrp-experiment

With kind regards,
Geoffrey De Smet

On 02/07/18 19:25, dav...@hawkeyelogs.com wrote:
Hi Sebastian,

Did you find the way to deal with such kind of problem, VRP with pickup and delivery constraints? My research focuses on it.

Could you have some idea? Thank you very much.

David

On Saturday, October 7, 2017 at 10:32:20 AM UTC-7, ma...@schmidt-seb.de wrote:
Hi there,

I'm implementing what is essentially a Vehicle Routing Problem with pick-up and delivery. The vehicle will pick-up packages and deliver them to other locations along the route. Hence, around half of the search-space is invalid as we can't deliver a package which hasn't been picked up before and is not loaded in the vehicle. 

I tried to implement that constraint by providing ValueRangeProvider on PlanningEntity level, but that didn't work because it doesn't seem to be supported with chained entities. 

What would be the Optaplanner-way to implement such a restriction in an efficient manner? 

Cheers,

Sebastian
--
You received this message because you are subscribed to the Google Groups "OptaPlanner development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optaplanner-dev+unsubscribe@googlegroups.com.
To post to this group, send email to optaplanner-dev@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "OptaPlanner development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/optaplanner-dev/ur3IMyTP5P4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to optaplanner-dev+unsubscribe@googlegroups.com.
To post to this group, send email to optaplanner-dev@googlegroups.com.

David Z

unread,
Jul 12, 2018, 1:58:56 PM7/12/18
to optapla...@googlegroups.com
Hi Geoffery,

Thank you for your reply.

My question is to obtain solutions for pickup and delivery problem with precedence constraints. For example, there are four loads needed to pick up from four their origins, then deliver to corresponding destinations. The only constraint is the order of pick up and delivery for each load. No order among loads. It likes: P1, P2,D1, P3, D3,P4,D2,D4. Could you have some ideas for this kind of problem? Thank you very much.

By the way, I looked at the user guide several times, but I have no idea how to integrate some idea into my java program. Any help ideas appreciated.

Best regards,

David

David


On Tue, Jul 3, 2018 at 9:29 AM, David Z <dav...@hawkeyelogs.com> wrote:
Hi Geoffery,

Thank you for your reply.

My question is to obtain solutions for pickup and delivery problem with precedence constraints. For example, there are four loads needed to pick up from four origins, then deliver to four destinations. The only constraint is the order of pick up and delivery for each load. No order among loads. It likes: P1, P2,D1, P3, D3,P4,D2,D4. Could you have some ideas for this kind of problem? Thank you very much.

David

Geoffrey De Smet

unread,
Jul 13, 2018, 3:13:31 AM7/13/18
to optapla...@googlegroups.com

Sorry, but I generally lack the time to understand complex constraints and handle deep modeling questions in the community.
Do take a look at "custom moves" in the docs - when it doesn't work out-of-the-box, they are my secret weapon.
I haven't seen a case yet I can't handle.

With kind regards,
Geoffrey De Smet

To unsubscribe from this group and stop receiving emails from it, send an email to optaplanner-d...@googlegroups.com.
To post to this group, send email to optapla...@googlegroups.com.

David Z

unread,
Jul 13, 2018, 11:50:51 AM7/13/18
to optapla...@googlegroups.com
Thank you for your reply. I will try it.


On Fri, Jul 13, 2018 at 12:13 AM, Geoffrey De Smet <gds.geoffr...@gmail.com> wrote:

Sorry, but I generally lack the time to understand complex constraints and handle deep modeling questions in the community.
Do take a look at "custom moves" in the docs - when it doesn't work out-of-the-box, they are my secret weapon.
I haven't seen a case yet I can't handle.

With kind regards,
Geoffrey De Smet

On 12/07/18 19:58, David Z wrote:
Hi Geoffery,

Thank you for your reply.

My question is to obtain solutions for pickup and delivery problem with precedence constraints. For example, there are four loads needed to pick up from four their origins, then deliver to corresponding destinations. The only constraint is the order of pick up and delivery for each load. No order among loads. It likes: P1, P2,D1, P3, D3,P4,D2,D4. Could you have some ideas for this kind of problem? Thank you very much.

By the way, I looked at the user guide several times, but I have no idea how to integrate some idea into my java program. Any help ideas appreciated.

Best regards,

David

David

On Tue, Jul 3, 2018 at 9:29 AM, David Z <dav...@hawkeyelogs.com> wrote:
Hi Geoffery,

Thank you for your reply.

My question is to obtain solutions for pickup and delivery problem with precedence constraints. For example, there are four loads needed to pick up from four origins, then deliver to four destinations. The only constraint is the order of pick up and delivery for each load. No order among loads. It likes: P1, P2,D1, P3, D3,P4,D2,D4. Could you have some ideas for this kind of problem? Thank you very much.

David
Reply all
Reply to author
Forward
0 new messages