0

Can jsprit solve the VRPSPD (vehicle routing problem with simultaneous pickup and delivery)?

The VRP with simultaneous pick-up and delivery (VRPSPD) is the following problem: a set of customers is located on a transportation network; each customer i requires either a delivery or a pick-up operation (or both) of a certain amount of goods (di) or waste (pi) and must be visited once for both operations. The service is provided by a set of vehicles of limited capacity Q; each vehicle leaves the depot carrying an amount of goods equal to the total amount it must deliver and returns to the depot carrying an amount of waste equal to the total amount it picked-up. In each point along its tour each vehicle cannot carry a total load greater than its capacity.The goal is to minimize the overall length of the tours. if jsprit can solve the VRPSPD,how to do it?

w.chener
  • 1
  • 1
  • Can you please elaborate on this a bit more as an edit? As a comment to the answer, you describe (I think) a situation where a delivery is done at location A, then further deliveries at, say B, C, D and E, before sufficient capacity is freed to go back to A to do a pickup. This is not a logical solution in a constrained problem unless I'm misunderstanding, which either means you haven't converged well on a solution or there are constraints in place that violate your "if possible" clause. – roganjosh Feb 20 '17 at 17:54
  • Is it related to this question? http://stackoverflow.com/questions/41111292/jsprit-deliver-sooner-rather-than-later-if-at-destination – roganjosh Feb 20 '17 at 17:58

1 Answers1

0

If I had understood the problem, I believe it can. Well, let's suppose that you have two shops, the first one in (5, 5) and the second one in (3, 7). The first shop has a pickup and also a delivery, the second shop has only a delivery.

Therefore:

Pickup   pck_shop1 = Pickup.Builder.newInstance("pck").addSizeDimension(0, 1).setLocation(5, 5)).build();
Delivery dlv_shop1 = Delivery.Builder.newInstance("dlv_1").addSizeDimension(0, 1).setLocation(5, 5)).build();
Delivery dlv_shop2 = Delivery.Builder.newInstance("dlv_2").addSizeDimension(0, 1).setLocation(3, 7)).build();
  • Thanks for you answer.I tried as much as you do, but it still can not guarantee that in the same shop to take pickup and delivery at the same time.if there are many shops have pickup and delivery, and one of them that pickup demand is far more than delivery demand,we defined it as p1 and d1.When the vehicle capacity is not enough to pick up p1,jsprit will competed d1 and then go through other shops until the vehicle capacity is enough,the appropriate time to return to complete the p1.This situation can not guarantee the completion of p1 and d1 at the same time. – w.chener Feb 19 '17 at 01:53
  • The simplest way I can think of is to do a pre-processing to combine the pickup and delivery at the same customer so that each customer has exactly one job when you use Jsprit to solve the problem. After you get the solution, you can do a post-processing to split those combined jobs and now it is guaranteed that the pickup and delivery at the same customer are done at the same time. However, this method may lead to violation of capacity constraint. A more elegant method is to apply a hard activity constraint to make sure the pickup and delivery at the same customer are done at the same time. – He Huang Mar 03 '17 at 10:54