1

I'm attempting to switch from JSprit to OptaPlanner for our Vehicle Routing Problem with pickup & delivery + time windows. JSprit is giving sub-optimal results and the process to get there is opaque, and performance is becoming an issue (scheduling 1-2k trips in a batch).

I see a discussion from 2018 discussing some of OptaPlanner's difficulties and performance issues surrounding heterogenous pickup & delivery, but it's not clear whether they've been resolved. Geoffrey has a link to his GitHub repo but it sounds more like a daring experiment than a best practice. I'm having trouble locating a good example of how others have modeled VRPPD + time windows.

The question, really, is: is it possible to model a VRPPD OptaPlanner problem that will perform well with thousands of trips and ~100 vehicles?

Edit: a bit more about the routing problem These are passenger pickups and dropoffs, in any order (allowing double-ups in a vehicle). Typically covering a state-wide area.

Soft Costs:

  • Extra passenger time in vehicle
  • Driver per-day salary, overtime
  • Fuel
  • Passenger earlier/later than requested time
  • Lunch breaks for drivers
  • Preferred vehicle types by passenger

Hard Costs:

  • Vehicle capacities (for ambulatory, wheelchair)
  • Vehicle features (ramp van)
  • Vehicle owner eligibility / billing rules
  • Excessive time in vehicle
  • Passenger arrives outside normal business hours
  • Do-not-share-vehicle for passenger

Additional wrinkles

  • Multi-leg trips, where a passenger is picked up at A, makes a 15-minute stop a B, then proceeds to C

I've been impressed by the documentation and performance I've seen in OptaPlanner so far. So I'm optimistic that this will work, but I wish there were more examples or best practices for time-windowed vehicle routing. Building a functional scheduler just to evaluate its feasibility is daunting.

Sam Barnum
  • 10,559
  • 3
  • 54
  • 60
  • 1
    Are you mixing pickups and deliveries? So for example can you: pick up A, pick up B, drop off B, pick up C, drop off A, drop off C? – Geoffrey De Smet Oct 19 '22 at 11:56
  • Correct, mixes pickups with optional double-ups in any order. – Sam Barnum Oct 19 '22 at 14:25
  • 1
    Then I fear the best we have is that mixedvrp experiment repo - we haven't focussed yet on this use case and it doesn't "just work" as most use cases. That worked when I wrote it, and I know a company that has it in production, but it didn't work properly last time I tried my codebase. It still uses chained variables, but even with @PlanningListVariable you still need custom move factories to both change the pickup and the delivery of an item. – Geoffrey De Smet Oct 19 '22 at 14:42
  • Good info! I'll work from your example. I'll take the warnings against using `InnerScoreDirector` with a grain of salt, since I'm not about to write my own implementation. Thanks! – Sam Barnum Oct 19 '22 at 14:52

0 Answers0