Discussion: Balancing approaches...

Questions refering to the Optiflow based API within PTV Developer (launched on 20.12.2023)
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2822
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Discussion: Balancing approaches...

Post by Bernd Welter »

HI there,

this thread is dedicated to discuss potential strategies towards "balacing of KPIs" such as
  • traveltimes / distances per tour
  • quantities
  • whatever you might "bring to a balanced level".
As we do not offer a built in mechanism (was available in xTour1 via BalancingParams) I would like to describe some technique how to enforce this.

What's the story behind that? Here's some typical description:
Our tour planning returns a plan where only a subset of our vehicles are used while 100% of the orders are scheduled. For some reasons we would like to create an output plan that uses all vehicles and utilizes them all in the same way, e.g. same tour period or same tour distance.
Now as we know the tour optimization in Optiflow engine is based on costs but as of now (24.1.2025) there's no direct parameter avaiable to push the planning into a balanced level. But how about this approach / example. The setting is based on
  • Single depot in the center of Milan
  • Fleet: 10 vans with each capacity 200
  • Workload: 50 orders with 15min delivery time and quantity 1
  • Target: let all tours have an almost equal tour period.
The idea is baed on a simple set of rules which are applied after an iteration round:
  • Play with the vehicle's maximum tour period
  • Rule 1: if orders remain unscheduled: increase the max tour period
  • Rule 2: if the balance isn't good enough: reduce the tour period
Now here is the iterative experience:
  • I start with a maximum route duration of 150 minutes...
    With a max tour period of 150 minutes only a fraction of the fleet is utilized: 7 trucks.
    With a max tour period of 150 minutes only a fraction of the fleet is utilized: 7 trucks.
  • With 140min I already need 8 vehicles, so I decide to reduce again
    With 140min I already need 8 vehicles, so I decide to reduce again
  • 130min : reduce again
    130min : reduce again
  • 120min : reduce again
    120min : reduce again
  • 100min : though the utilization of the vehicles seems to be balanced this threshold causes unscheduled orders: Rule 1 applies! RELAX
    100min : though the utilization of the vehicles seems to be balanced this threshold causes unscheduled orders: Rule 1 applies! RELAX
  • 112min : still unscheduled orders: Rule 1 : RELAX
    112min : still unscheduled orders: Rule 1 : RELAX
  • 114mins - still 1 unscheduled order
    114mins - still 1 unscheduled order
  • 118 - all scheduled... Rule 2... and so on
    118 - all scheduled... Rule 2... and so on
  • Now after this last iteration the conclusion is
    • lowest balanced scenario with 100% scheduled orders is somwhere between 114 and 118 minutes
    • This chart shows the impact on the costs: reducing the threshold pushes towards higher costs. Relaxing reduces costs (at the end). The cheapest solution ever was the one when balancing was completely irrelevant.
      This chart shows the impact on the costs: reducing the threshold pushes towards higher costs. Relaxing reduces costs (at the end). The cheapest solution ever was the one when balancing was completely irrelevant.
Remarks:
  • As the approach is based on a sequence of calls the overall performance requires more patience
  • Based on stable cost parameters the final plan is probably more / way more expensive than the initial one
  • Depending on what KPI you want to balance you need to identify the proper threshold value parameter(s)
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2822
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Discussion: Balancing approaches...

Post by Bernd Welter »

Just discussed this with the colleagues from the engine team and competence center. Their recommended strategy is was more simple to implement:
  • Ensure to have the vehicle fix costs set to 0.0 - this ensures that utilizing all vehicles is not a conflict.
  • Set the regular vehicle working costs and distance costs to compareably cheap set for an acceptable "minimum tour length" and add significant overtime costs for the rest.
  • Example: 5 vehicles - 9:00-17:00...:
    • Vehicle.Costs.perHour = 2'000
    • Vehicle.Costs.perKilometer = 100
    • Vehicle.Costs.Overtimes.Threshold = 3600
    • Vehicle.Costs.Overtimes.extraPerHour = 10'000

    Code: Select all

    "costs": {
            "perHour": 2000.0,
            "perKilometer": 100.0,
            "overtimes": [
              {
                "threshold": 3600,
                "extraPerHour": 10000.0
              }
            ]
          },
    One vehicle does the workload...
    One vehicle does the workload...
    But two are balanced...
    But two are balanced...
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply