arXiv:2610.32698cs.MAOct 2026

Manuscript Offprint

arXiv:2610.32698

Agent-Based Transport Model Calibration via Online Stochastic Batch Optimization

Abdelkader Dib, Milos Balac

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Calibrating agent-based models (ABMs) is computationally demanding, as traditional black-box optimization typically requires hundreds or thousands of independent simulation runs. To reduce this burden, we introduce an online calibration framework that estimates parameters within a single simulation run. The approach combines black-box optimization with stochastic batch optimization, a method widely applied in machine learning but not yet explored in ABM calibration. Using MATSim as a case study, we treat each simulation iteration as a stochastic batch, enabling incremental parameter updates as agents make decisions. This online calibration paradigm allows model parameters and agent behaviors to co-evolve, achieving convergence without restarting the simulation. We demonstrate the effectiveness of our method by calibrating utility function parameters in MATSim for a large-scale transportation scenario of Switzerland. Results show that mode shares align closely with observed data within a typical simulation timeframe, confirming the feasibility and efficiency of the approach. By embedding calibration directly into the simulation loop, our method opens new possibilities for real-time, scalable, and efficient calibration of complex ABMs.

Keywords: Agent-based modeling, calibration, optimization, transportation modeling, MATSim

1. Introduction

Agent-based modeling (ABM) has become a key tool in transportation planning for simulating the unique characteristics and complex behaviors of individual travelers and their interactions (Bonabeau, 2002; Bastarianto et al., 2023). By representing each traveler as an agent with detailed attributes, plans, and decision rules, ABMs can capture heterogeneous responses to policy interventions, network changes, and emerging mobility solutions (Hörl et al., 2019a; Becker et al., 2020).

A major challenge for the practical deployment of ABMs is calibration (Robertson et al., 2025a; Bastarianto et al., 2023; Windrum et al., 2007), the process of adjusting model parameters so that simulated outputs align with real-world observations. Calibration involves running the model with varying parameters and evaluating performance by comparing outputs against observed data, with the goal of finding parameter sets that minimize discrepancies between simulation and reality (Windrum et al., 2007).

For instance, in MATSim (Multi-Agent Transport Simulation (Horni et al., 2016)), an open-source, agent-and activity-based modeling framework that simulates individual travel behavior within transportation networks, mode choice models rely on utility functions with multiple parameters such as alternative-specific constants or marginal utilities. While these parameters can be initially estimated from survey data, they often require adjustment to align simulated mode shares with observed values. Such adjustments compensate for (i) model discrepancy, as models inevitably simplify real-world systems and cannot perfectly reproduce them (McCulloch et al., 2022), and (ii) potential biases or limitations in survey data, which may be incomplete or unrepresentative, necessitating the inclusion of additional data sources. Furthermore, unmeasured factors not explicitly modeled in MATSim (Rakow et al., 2025), such as comfort, public transport crowding, or perceived safety, can strongly influence travel behavior and vary across different regions. Consequently, when extracting a regional model from a larger model, calibration is necessary to account for these regional differences.

The standard calibration workflow for large-scale ABMs such as MATSim is computationally intensive. Each candidate parameter set requires a full simulation run to generate output metrics (e.g., mode shares, traffic

∗^{*}Presented at the World Conference on Transport Research (WCTR 2026), Toulouse, France.

∗^{*}Corresponding author. Tel.: +41 78 446 11 95.

Email address: dabdelkader@ethz.ch (Abdelkader Dib)

(counts) for comparison with observed data. A new parameter set is then proposed, and the iterative process continues until the output metrics fall within an acceptable range. Calibration methods typically rely either on manual parameter tuning by domain experts (Hörl and Balac, 2021a; Ziemke et al., 2019; Dib et al., 2025; Tiwari et al., 2024) or on “black-box” optimization algorithms that explore the parameter space without explicit knowledge of the model structure (Hörl, 2022; Liang, 2018). Although these methods can be effective, they often require hundreds or thousands of full simulation runs. For large-scale applications, where simulations may involve millions of agents and complex networks, with a single run lasting several hours or more, this approach becomes impractical.

This paper introduces an alternative paradigm: online calibration for large-scale ABMs using stochastic batch optimization, a technique inspired by the machine learning (ML) field but, to the best of our knowledge, not previously applied to ABM calibration. Rather than executing multiple independent simulations within a black-box optimization loop, the calibration process is embedded directly into the simulation’s iterative dynamics. In this way, parameter adjustment occurs within a single run.

In this work, we propose a single-run, iterative calibration framework that shifts the focus from multi-run black-box optimization to online stochastic batch optimization.

The remainder of this paper is structured as follows: section 2 reviews related work on ABM calibration and estimation methods, section 3 introduces eqasim Hörl and Balac (2021a) and MATSim, which are used in our use cases, and outlines the concept of stochastic batch optimization, section 4 formalizes the proposed calibration algorithm, section 5 reports experimental results on a large-scale transportation scenario, and section 6 provides a discussion of the findings. Finally, section 7 concludes with implications and directions for future research.

References (56)