Can jsprit solve the vehicle routing problem with simulteneous 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?

You can define shipments each having a pickup and drop location. Have a look at this example.

For the mailing list, this problem is not elaborated on enough to get a reasonable answer. From your Stack Overflow post, there is more detail to what you’re trying to solve. Please clarify the problem either here or there where I left a question (and if there, notify here). Otherwise, we’re just guessing about the larger problem :slight_smile:

Thanks for your answers. But it still have a question.Jsprit’shipment have two location(pickup location and delivery location) and one demand,however each customer’s requires have two demand(pickup demand and delivery demand,a customer must be visited once for both operations) and one location.It is different from a shipment.

Thanks for you answers.I have updated my question.

The question, as edited on SO, is not a shipment problem. di and pi (product and waste, respectively) occupy the same space in the vehicle. It’s a standard problem of pickups (pi) and deliveries (di), not shipments e.g. this. That problem can be easily solved through the standard API so maybe something went wrong there?

In your comment to the answer given on that post, you have an extra requirement that a vehicle should not visit a single location more than once?

Can the standard API easily solved the VRPSPD? Can you tell me what’s the API?

I mean in terms of the base capabilities of Jsprit, as in the example I linked to. I’m not sure there is a need for any custom constraints or anything. I have asked for some clarifications on both sites which haven’t been addressed so I cannot give you a more detailed answer sorry.