DOI: 10.5281/zenodo.10648077
title: Integrated Agent-based Modelling and Simulation of Transportation Demand and Mobility Patterns in Sweden

description: About

The Synthetic Sweden Mobility (SySMo) model provides a simplified yet statistically realistic microscopic representation of the real population of Sweden. The agents in this synthetic population contain socioeconomic attributes, household characteristics, and corresponding activity plans for an average weekday. This agent-based modelling approach derives the transportation demand from the agents’ planned activities using various transport modes (e.g., car, public transport, bike, and walking).



This open data repository contains four datasets: 

(1) Synthetic Agents, 




(2) Activity Plans of the Agents,  




(3) Travel Trajectories of the Agents, and  




(4) Road Network (EPSG: 3006)

(OpenStreetMap data were retrieved on August 28, 2023, from https://download.geofabrik.de/europe.html, and GTFS data were retrieved on September 6, 2023 from https://samtrafiken.se/)

The database can serve as input to assess the potential impacts of new transportation technologies, infrastructure changes, and policy interventions on the mobility patterns of the Swedish population.


Methodology

This dataset contains statistically simulated 10.2 million agents representing the population of Sweden, their socio-economic characteristics and the activity plan for an average weekday. For preparing data for the MATSim simulation, we randomly divided all the agents into 10 batches. Each batch's agents are then simulated in MATSim using the multi-modal network combining road networks and public transit data in Sweden using the package pt2matsim (https://github.com/matsim-org/pt2matsim).  

The agents' daily activity plans along with the road network serve as the primary inputs in the MATSim environment which ensures iterative replanning while aiming for a convergence on optimal activity plans for all the agents. Subsequently, the individual mobility trajectories of the agents from the MATSim simulation are retrieved.

The activity plans of the individual agents extracted from the MATSim simulation output data are then further processed. All agents with negative utility score and negative activity time corresponding to at least one activity are filtered out as the ‘infeasible’ agents. The dataset ‘Synthetic Agents’ contains all synthetic agents regardless of their ‘feasibility’ (0=excluded & 1=included in plans and trajectories). In the other datasets, only agents with feasible activity plans are included. 

The simulation setup adheres to the MATSim 13.0 benchmark scenario, with slight adjustments. The strategy for replanning integrates BestScore (60%), TimeAllocationMutator (30%), and ReRoute (10%)— the percentages denote the proportion of agents utilizing these strategies. In each iteration of the simulation, the agents adopt these strategies to adjust their activity plans. The "BestScore" strategy retains the plan with the highest score from the previous iteration, selecting the most successful strategy an agent has employed up until that point. The "TimeAllocationMutator" modifies the end times of activities by introducing random shifts within a specified range, allowing for the exploration of different schedules. The "ReRoute" strategy enables agents to alter their current routes, potentially optimizing travel based on updated information or preferences. These strategies are detailed further in W. Axhausen et al. (2016) work, which provides comprehensive insights into their implementation and impact within the context of transport simulation modeling. 

Data Description

(1) Synthetic Agents

This dataset contains all agents in Sweden and their socioeconomic characteristics.  

The attribute ‘feasibility’ has two categories: feasible agents (73%), and infeasible agents (27%). Infeasible agents are agents with negative utility score and negative activity time corresponding to at least one activity. 

File name: 1_syn_pop_all.parquet






Column



Description



Data type



Unit





PId



Agent ID



Integer



-



Deso
Zone code of Demographic statistical areas (DeSO)1
String
-




kommun

Municipality code
Integer
-




marital 

Marital Status (single/ couple/ child)
String
-




sex 

Gender (0 = Male, 1 = Female)
Integer
-




age

Age
Integer
-




HId

A unique identifier for households
Integer
-




HHtype  

Type of households (single/ couple/ other)
String
-




HHsize  

Number of people living in the households
Integer
-




num_babies

Number of children less than six years old in the household
Integer
-


employment
Employment Status (0 = Not Employed, 1 = Employed)
Integer
-


studenthood
Studenthood Status (0 = Not Student, 1 = Student)
Integer
-


income_class
Income Class (0 = No Income, 1 = Low Income, 2 = Lower-middle Income, 3 = Upper-middle Income, 4 = High Income)
Integer
-


num_cars
Number of cars owned by an individual 
Integer
-


HHcars
Number of cars in the household
Integer
-




feasibility

Status of the individual (1=feasible, 0=infeasible)
Integer
-




1 https://www.scb.se/vara-tjanster/oppna-data/oppna-geodata/deso--demografiska-statistikomraden/

(2) Activity Plans of the Agents

The dataset contains the car agents’ (agents that use cars on the simulated day) activity plans for a simulated average weekday.   

File name: 2_plans_i.parquet, i = 0, 1, 2, ..., 8, 9. (10 files in total)






Column



Description



Data type



Unit





act_purpose



Activity purpose (work/ home/ school/ other)



String



-





PId



Agent ID



Integer



-





act_end 



End time of activity (0:00:00 – 23:59:59)



String



hour:minute:seco

nd





act_id



Activity index of each agent



Integer



-





mode



Transport mode to reach the activity location



String



-





POINT_X        



Coordinate X of activity location (SWEREF99TM)



Float



metre





POINT_Y



Coordinate Y of activity location (SWEREF99TM)



Float



metre





dep_time    



Departure time (0:00:00 – 23:59:59)



String



hour:minute:seco

nd





score



Utility score of the simulation day as obtained from MATSim



Float



-





trav_time   



Travel time to reach the activity location



String



hour:minute:seco

nd





trav_time_min    



Travel time in decimal minute



Float



minute





act_time 



Activity duration in decimal minute



Float



minute





distance



Travel distance between the origin and the destination



Float



km





speed



Travel speed to reach the activity location



Float



km/h





(3) Travel Trajectories of the Agents

This dataset contains the driving trajectories of all the agents on the road network, and the public transit vehicles used by these agents, including buses, ferries, trams etc. The files are produced by MATSim simulations and organised into 10 *.parquet’ files (representing different batches of simulation) corresponding to each plan file.

File name: 3_events_i.parquet, i = 0, 1, 2, ..., 8, 9. (10 files in total)

 










Column 









Description 









Data type 









Unit 











time 









Time in second in a simulation day (0-86399) 









Integer 









second 











type 









Event type defined by MATSim simulation* 









String 









- 











person 









Agent ID 









Integer 









- 











link 









Nearest road link consistent with the road network 









String 









- 











vehicle 









Vehicle ID identical to person 









Integer 









- 











from_node      









Start node of the link 









Integer 









- 











to_node   









End node of the link 









Integer 









- 







* One typical episode of MATSim simulation events: Activity ends (actend) -> Agent’s vehicle enters traffic (vehicle enters traffic) -> Agent’s vehicle moves from previous road segment to its next connected one (left link) -> Agent’s vehicle leaves traffic for activity (vehicle leaves traffic) -> Activity starts (actstart) 

(4) Road Network

This dataset contains the road network.

File name: 4_network.shp










Column 









Description 









Data type 









Unit 











length 









The length of road link 









Float 









metre 











freespeed 









Free speed 









Float 









km/h 











capacity 









Number of vehicles 









Integer 









- 











permlanes 









Number of lanes 









Integer 









- 











oneway 









Whether the segment is one-way (0=no, 1=yes) 









Integer 









- 











modes 









Transport mode 









String 









- 











from_node 









Start node of the link 









Integer 









- 











to_node 









End node of the link 









Integer 









- 











geometry 









LINESTRING (SWEREF99TM) 









geometry 









metre 







 

Additional Notes

This research is funded by the RISE Research Institutes of Sweden, the Swedish Research Council for Sustainable Development (Formas, project number 2018-01768), and Transport Area of Advance, Chalmers.

Contributions

YL designed the simulation, analyzed the simulation data, and, along with CT, executed the simulation. CT, SD, FS, and SY conceptualized the model (SySMo), with CT and SD further developing the model to produce agents and their activity plans. KG wrote the data document. All authors reviewed, edited, and approved the final document.