0

I have to solve a vehicle routing problem for production level application .

Problem Statement :-

Vehicle has :-

  • Type
  • Capacity
  • Fleet Time
  • cost = fixed cost + variable cost
  • Variable cost is added if we are using vehicle after Fleet Time.

Pickup Point :-

  • Load to be picked . We have to pick all the load
  • Time Slot in which we can pickup.
  • Time Spent to pick the load.

Destination Point :-

  • Vehicle must reach in that Time Slot only .
  • Time Spent to unload.

Vehicle can come back to starting point again or go to destination point directly .

Destination Point will be at distance from Pickup points . So multiple small Vehicles can meet at single point(Can be starting point or We will define define the point always) and then feed its shipments to Larger vehicle .

Larger vehicle can directly go to destination point .

We can also run Larger vehicle in first place only . It will pickup the load from all the points . Then go to destination point .

It would be good if i am getting the no. of vehicles also as part of routing output .

I am new to this area . Can jsprit or optaplanner provide solution for this ?

T.J.
  • 1,466
  • 3
  • 19
  • 35
  • It's a typical case for OptaPlanner too. See [this video on VRPTW](https://www.youtube.com/watch?v=BxO3UFmtAPg). Can you mix pickups and dropoffs? For example, taxi's or ambulances can't pickup 2 separate passengers, but DHL or Fedex can pickup at multiple locations before doing a dropoff. That impacts the domain model. – Geoffrey De Smet Jun 09 '16 at 09:11
  • Yes , we can mix pickups and dropoffs . It is similar to DHL or Fedex . – T.J. Jun 09 '16 at 09:13
  • Can pickups be delivered directly (without going back to the depot)? – Geoffrey De Smet Jun 09 '16 at 09:16
  • Can we handle situation like this :- Multiple small Vehicles can meet at single point(Can be starting point or We will define define the point always) and then feed its shipments to Larger vehicle . Larger vehicle can directly go to destination point . How to model that point ? – T.J. Jun 09 '16 at 09:17
  • Yes pickups can be delivered directly without going to deport . We have a very large truck . Small vans can come to that truck and truck can go to destination . No need to go to depot . Truck location will be defined by us . – T.J. Jun 09 '16 at 09:19
  • @T.J. You can set start location for vehicle same as the Truck and end point can be depot. – sutirtha Jun 09 '16 at 09:26
  • @T.J. If I am getting right, you want to merge 1) to pick up and deliver to larger vehicle by smaller vehicle 2) larger vehicle to travel to another delivery points 3) distribute to delivery points by small vehicle. In that case you can split that to 3 separate problems. I don't know if Jsprit has the solution for this whole thing. – sutirtha Jun 09 '16 at 09:33
  • Yes . we can divide the problem in above way also . but in second model , It might be the case that there are no smaller vehicles . Large truck will depart from deport point , pick and deliver if cost is less than the above defined model . Also can we divide problem in jsprit like you mentioned ?? – T.J. Jun 09 '16 at 10:00

1 Answers1

1

I can say both jsprit and optaplanner can solve this. I am more familiar with jsprit. There are lots of example given in jsprit you can try that also. You can start with a simple example: https://github.com/graphhopper/jsprit/blob/master/jsprit-examples/src/main/java/com/graphhopper/jsprit/examples/SimpleExample.java

Then there is example for pick up and delivery problem having time window. https://github.com/graphhopper/jsprit/blob/master/jsprit-examples/src/main/java/com/graphhopper/jsprit/examples/PickupAndDeliveryExample.java

sutirtha
  • 375
  • 3
  • 21
  • In Jsprit , how we can remove the constraint " Always return to same Depot" ?? – T.J. Jun 09 '16 at 07:22
  • Also can we handle situation like this :- Multiple small Vehicles can meet at single point(Can be starting point or We will define define the point always) and then feed its shipments to Larger vehicle . Larger vehicle can directly go to destination point . – T.J. Jun 09 '16 at 07:33
  • @T.J. You need to use builder.setReturnToDepot(false) to remove the constraint – sutirtha Jun 09 '16 at 09:23