Skip to content

MATSim

Multi-Agent Transport Simulation (MATSim) is an open-source framework for large-scale agent-based transport simulation (Horni, Nagel and Axhausen, 2016).

Websitematsim.org
LicenceOpen source
TypeLarge-scale agent-based transport simulation

It represents individual travellers as autonomous agents whose daily activity and travel plans are executed on a digital representation of the transport system.

What makes it different

Rather than assigning aggregate origin-destination flows directly to the network, MATSim simulates the movements and interactions of individual travellers and vehicles throughout the day.

The consequence is that congestion, travel times, route choices and other network conditions emerge dynamically from interactions among agents, rather than being imposed by an assignment procedure.

What it can represent

Modes

  • Car
  • Public transport
  • Walking
  • Cycling

Extensions

The framework can be extended to investigate policies and scenarios including:

AreaExamples
PricingRoad pricing
Service provisionPublic transport provision, shared mobility
GoodsFreight transport
EnvironmentEmissions
Network changeInfrastructure changes, disruptions

Disruptions are the IMP's use case

That last item is why MATSim sits at the centre of this framework. Closing or degrading links and re-running the simulation is precisely how a flood or heatwave becomes a measurable transport consequence.

MATSim therefore provides the transport-simulation component that links individual travel demand to transport supply, and quantifies the resulting network performance and traveller behaviour.

The iterative co-evolutionary loop

MATSim applies an iterative co-evolutionary simulation process consisting principally of three stages, repeated many times.

1. Mobility simulation

During each iteration, one daily plan is selected for every traveller and executed in the mobility simulation, where agents and vehicles interact with one another on capacity-constrained transport networks.

MATSim's standard mobility simulation uses a queue-based representation, in which network links constrain vehicle flow and storage capacity (Gawron, 1999; Alvarez Castro, 2024).

The resulting network conditions determine the experienced travel times, delays and other characteristics of each journey.

2. Scoring

After execution, each agent's plan is assigned a utility or score, reflecting:

Contributes positivelyContributes negatively
The benefits of performing activitiesTravel time
Distance
Monetary costs
Other configured factors

Scoring is where behaviour is encoded

The scoring function is the model's statement about what people value. Changing the relative weight of travel time against activity benefit changes what agents will tolerate, and therefore what the simulation predicts they do when a route is disrupted.

It is configured rather than fixed, which is why the configuration file matters as much as the data.

3. Replanning

During replanning, agents take one of two paths:

Agent groupWhat happens
A proportion of agentsModify elements of their plans, most commonly routes, departure times or transport modes
The remaining agentsSelect among previously experienced plans, according to their scores

The modified plans are then executed in the next iteration, under the network conditions generated collectively by all travellers.

Convergence

This process is repeated over many iterations until aggregate network conditions and agent choices become sufficiently stable, producing an approximate behavioural and network equilibrium for the simulated scenario.

Why "co-evolutionary"

No agent optimises against a fixed environment. Each agent's choices change the conditions every other agent faces, so all of them adapt together.

This is why the model must iterate to equilibrium rather than solving in one pass, and why the iteration count is a configuration decision with real consequences for result quality.

An open list

As elsewhere in the handbook:

Any other transport models used or developed in DARe must be included as the one above.