javaoptaplannertimefold

which time format is used in optaplanner for the vehicle routing problem time windowed with JSON file


I use JSON file exists in example in optaplanner for the vehicle routing problem time windowed, but I have a problem with time window format. What is the best format recognized by this file? thank you.

I tried hours format, the window time is well represented on the graph, but the solution is not optimal, then I tried minutes and seconds format, the time windows is not represented on the graph.


Solution

  • The examples's old vehicle-routing implementation use measureless numbers for service duration and travel time. Not durations/time. That's messy in the real world.

    The new vehicle-routing-time-windows quickstart in Timefold (fork of OptaPlanner, also open source) uses ISO formatted times and durations. Travel time is calculated by haversine. It has curl instructions to get a sample JSON file (look for the Guide link in the top).