Sebastian Hörl

21 October 2026

PAAMS 2026

Iterative LLM-based construction of on-demand
fleet dispatching algorithms

Introduction

  • On-demand mobility services
    • centrally operate a fleet of (autonomous) vehicles
    • give instructions to pick up / drop off passengers or relocate
    • try to serve the incoming customer demand under constraints (max. wait time, ...)

Fleet dispatching

  • Fleet dispatching means defining which vehicle should pick up and drop off which requests and in which order
     
  • Assignments need to adhere to constraints (latest pickup time, latest dropoff time, maximum detour, ...)
     
  • Rigorous formulation: Vehicle Routing Problem
    • Too complex for large-scale applications
       
  • Various heuristics exist
    • Insertion algorithms
    • Re-optimization algorithms

Idea

  • Algorithms are often generic: they work on any city and in any context
     
  • But we do have contextual knowledge (geography, demand patterns, special events, ...)
     
  • How to integrate them into an algorithm?
    • Person 1 has the local knowledge
    • Person 2 knows how to formalize this algorithmically
    • Person 3 knows how to implement this in the specific base algorithm
    • Person 4 knows how to test this in simulation (and tweak the parameters)

 

 

 

 

 

 

 

 

 

  • Can persons ons 2-4 be automated through intelligent code generation?

Test environment

  • Using MATSim (a commonly used open-source agent-based transport simulation framework)
  • Already provides functionality to implement (in Java) dispatching algorithms
     
  • We added a remote dispatching interface (RDI) that let's users connect external algorithms via a networked API
     

Hörl, S. (2026). Benchmarking on-demand mobility algorithms using a new remote dispatching interface for MATSim. MATSim User Meeting 2026 (MUM 2026). https://hal.science/hal-05739922

Test environment

  • A couple of example algorithms in Python
    • FIFO assignment
    • Global Bipartite Matching
    • ...
       
  • Allows using anything that is available in Python (scikit-learn, networkx, ...)
     
  • Thorough documentation of the communication primitives

Test environment

Road network

  • Extraction of Paris from OpenStreetMap
    (14k nodes, 24k edges)

 

Fleet

  • Configurable number of vehicles generated on random initial links inside the network
  • All have four seats

 

Customer requests

  • Definition of N attractors / emitters with morning / evening factors
  • Requests are generated from / to those points depending on time of day
  • Represents directionality by time of day and spatial imbalance

Example benchmark

Test environment

  • Containerized execution environment
    • One dispatching algorithm (Python file)
    • One MATSim instance
    • Inside a Docker container
       
  • Writing a new algorithm using an LLM
     
  • Evaluate the performance of the algorithm inside the container

Repeat

Prompt construction

You are designing a fleet dispatching algorithm. Some general explanations about fleet dispatching. You are part of an iterative loop. I present you the documentation, some examples, and the (R= 3) last versions that you have tested, plus the so far best one. You may used the standard output to gain information. Give each version a name, and explain features.

Three example algorithms

Documentation

Algorithm code

Objective value: ??? [if successful] / There have been errors! [if unsuccessful]

Standard output (last 100 lines)

Error output [if unsuccessful or timeout of 600s]  (last 100 lines)

"

3x

Backlog section

"

Best algorithm code

Objective value: ???

Standard output

"

R x

Fixed section

Elitist guidance

Test configuration

Simulation case

  • 25 vehicles
  • 2,000 requests

 

Profit-optimization objective

  • Cost = 25 EUR per vehicle + 0.10 EUR per driven kilometre + 0.35 EUR per request
  • Revenue = 0.50 EUR base fare per request + 0.3 EUR per passenger kilometre
  • Profit = Revenue - Cost
     
  • Additional payback of 0.5 EUR for each minute of delay upon arrival

Experiments

  • Qwen3-Next-80B-A3B-Instruct on institute-local vllm infrastructure
     
  • We see a steady increase of the objective over multiple algorithm versions
     
  • Overtaking the Euclidean Bipartite Matching and Insertion (default MATSim algorithm) benchmarks
     
  • Seemingly, making a trade-off between exploitation vs. exploration after about 40 versions

Experiments

  • LLM time increases steadily with more information
     
  • About 120k tokens for the largest cases

Experiments

The best algorithm

  • Highest profit in comparison
  • But lowest number of rides
     
  • Effectively maximizes the revenue per request by rejecting non-lucrative customers

Profit-Optimized Dispatching with Cluster-
Specific Profit-Weighted Momentum and Adaptive Rejection Thresholding

Next steps

Ablations

  • Backlog length
  • Standard ouput length
  • Different LLMs
  • Different time budgets
  • Different demand / fleet cases

More features

  • Analysis step after each run with a summary output
  • Reflection step to analyse observed demand patterns during each iteration

More directed test cases

  • Artificial cases with varying density
    • Algorithm should overfit to one case
    • Perform worst on other cases
       
  • Multiple (French) cities with different topologies
    • Can the LLM figure out geographical constraints and bottlenecks?

Interested?

Run these experiments out-of-the-box:

Thank you!

sebastian.horl@irt-systemx.fr

Icons throughout the presentation: https://fontawesome.com

Website

Contact