问题
I am working on a VRP with the following characteristics:
- The vehicle can only pick up 1 customer at one time
- The vehicle picks up a customer at a location and drops off the customer at the destination
- After dropping off the customer the vehicle goes on to pick up another customer
- There is no depot that vehicle needs to go to in between the trips .
- The vehicle makes as many trips as it can in a day to pickup/drop-off customers
- At the end of day, the vehicle goes back to its designated parking station
Essentially, it's like a taxi system. It seems to me that it's a VRP with multiple trips(VRPMT) and no depot (Open VRP). I'd like to know
- Does optaplanner has support for VPRMT and OVRP out of box?
- If VPRMT and OVRP are not supported out of box, how easy is it to modify the existing CVRP/CVRPTW examples to make it solve OVRP and VPRMT?
- Maybe I am on the wrong track and it's not even a VRP. If so, what would be the right planning problem for the taxi like system?
Many thanks in advance!
回答1:
- No, the examples don't include pickup and delivery or multiple trips yet
- Users have done it before to add Pickup and Delivery (which is easy if multiple customers cannot be in the vehicle at the same time (otherwise it's harder and I might add an example for that way some day). Multiple trips and open VRP should by easy (although I think your parking station is a depot and you probably don't have multiple trips, just multiple customer sequentially in the same trip).
- This is definitely a variant of VRP. Do note that every business has their own flavor of VRP. You'll always find some custom constraints (now or later in the development process). OptaPlanner allows you to add those custom constraints as needed.
Try this: Take the OptaPlanner VRP example, rename Depot to ParkingStation. Split up Customer's Location into pickupLocation and deliveryLocation and adjust the score rules so the soft score is the sum of:
- all pickup to delivery distances
- all delivery to next pickup distances
- each parking to first pickup distance
- each last delivery to parking distance
来源:https://stackoverflow.com/questions/33266431/does-optaplanner-out-of-box-support-vrp-with-multiple-trips-and-no-depot