Agent-based simulation model of cyclists and pedestrians at a regional scale

. Mobility data of cyclists and pedestrians are fundamental for design and planning strategies of sustainable smart cities. However, adequate data is commonly scarce, expensive to acquire, or hardly accessible. For overcoming this shortcoming and providing support in planning processes, we propose an agent-based model that simulates bicycle and pedestrian traffic flows at a regional scale over one day. The bottom-up approach allows to set individual behaviour that generates system-level patterns. The uncertainty analysis of model results shows moderate and strong correlations with the observational data in terms of spatial and temporal distribution of traffic volumes. The model produces traffic flows at a high spatial (road segment) and temporal (minute) resolution. The model can be used as a scenario-based solution for simulating traffic in different conditions of a physical environment and travel behaviour.


Introduction
Existing problems with space, congestions, and pollution in cities are growing, and new strategies are aiming at providing infrastructure and services that promote sustainable mobility (BMLFUW, 2015;ECF, 2017). Data on where and when cyclists and pedestrians travel for everyday trips can inform planning decisions on where sufficient infrastructure is needed.
Current methods in tracking movement data at individual (GPS trajectories, mobile phone data) and population level (stationary traffic counts) are expensive and exceptional to some cities (International Transport Forum, 2012). While some indirectly collected data, such as from fitness-oriented mobile applications, can be biased due to sampling, other mobility data can lack in temporal and spatial representation because of timelimited acquisition campaigns.
There are methods that aim at estimating mobility data by extrapolating a sample of trajectory or counting data to an entire city network. Such methods include regression analysis (Desyllas et al., 2003;Liu and Griswold, 2009;Hankey et al., 2012;Fagnant and Kockelman, 2016) and space syntax models (Lerman et al., 2014;Mcdaniel et al., 2014;Cooper, 2017;Santilli et al., 2021).
Finally, there are methods that model transportation systems and processes triggered by behavioural choices of a population. Discrete choice models use utility maximization functions with individual and external factors that influence a certain travel decision (Hoogendoorn and Bovy, 2005;Robin et al., 2009). Microsimulation models use bottom-up approaches where behaviour is identified at an individual level of a person. Studies on simulating bicycle and pedestrian traffic include activity-based models (Danalet et al., 2013;Qiu and Hu, 2013), cellular automata models (Blue and Adler, 2001;Jin et al., 2015), and agent-based models (Wallentin and Loidl, 2015;Leao and Pettit, 2017;Wörle et al., 2021;Ziemke et al., 2019).
Most studies that simulate regional traffic of cyclists and pedestrians require large amounts of counting data specific to time and an area, thus, being less flexible in terms of reusability for different environmental conditions. The other studies that include behavioural aspects in their concepts are focused on processes at a microscale or simulate abstract scenarios with simplified trips.
Little attention has been paid to implement a transport model that simulates bicycle and pedestrian traffic flows at a regional level, represents mobility behaviour in their rulesets and is flexible in testing different scenarios. This paper attempts to show a methodology of simulating daily bicycle and pedestrian traffic flows for an entire city region at high spatial (road segment) and temporal (minute) resolutions. The behavioural rulesets include choices of activity type, mode, route, departure time, etc. They are based on probability distributions and thresholds derived from mobility surveys, population statistics, and reports. The model can be used as a tool to simulate effects of transport and mobility measures. By changing input parameters in behavioural rules and a built environment, it allows to observe the changes in traffic distribution.

Methods
Our model uses the agent-based modelling approach that allows to simulate individual behaviour of population and emergent system-level traffic patterns (Crooks et al., 2019). The traffic flows of cyclists and pedestrians are the outcome of dynamic decisions of residents and tourists travelling to activities according to preferences and probabilities. In this study, the model has been applied to a greater region of Salzburg city in Austria. It is assumed that tourists significantly contribute to the volumes of pedestrian traffic in urban areas such as Salzburg city centre, thus they are included in the model.

Model description
A simulated transportation system consists of a built environment and persons, represented as residents and tourists. Residents of Salzburg region are defined by age, gender, employment, and education status. Tourists are characterized by type, such as daily tourists that come by bus for a day, and overnight tourists.
The built environment includes a street network, facilities, and counting stations. The street network is characterized by indicators that estimate bikeability and walkability indices. They are used as impedance in routing calculation. The estimation of indices follows an approach developed for the NetAScore network assessment tool (Werner et al., 2022).
The model starts with the initialization where the built environment and persons are created. The simulation consists of system-level and individual processes that represent decision-making and actions of persons illustrated in the flowchart in Fig. 1. Every person iteratively selects an activity, starts a trip, moves, and stops a trip. Activity selection consists of the following choices and options: • Activity type: home, work, business, education, shopping, authority, doctor/hospital, bringing to a kindergarten or a hospital, and other activity. • Tourist activity type: visiting museums, churches, theatres, street points, squares, shops, cafés, restaurants, and bars.   Counting stations register traversing cyclists and pedestrians. These simulated counts are further used in the evaluation of model results.

Data and Software Availability
We use GAMA agent-based modelling platform to simulate the model (Taillandier et al., 2017). The platform satisfies operational requirements of the model, being able to simulate a large population of agents at a highly disaggregated spatio-temporal resolution. GAMA's spatial functionalities and the ability to represent spatial data, such as a network graph, increases its usability for transport modelling. The source code, input data, and detailed description of bicycle and pedestrian models can be found in CoMSES Net library for agent-based models.

Uncertainty analysis
Uncertainty in the model is defined by stochasticity in behavioural rulesets as well as due to input data and model design. Stochastic uncertainty is measured by calculating experimental error variance of numerous simulation runs (Lorscheid et al., 2012). Its estimation provides the optimal number of runs required to obtain most accurate results given the stochastic nature of modelled concepts.
The variance represents the mean and standard deviation of daily counts of cyclists and pedestrians at 20 random locations. For each additional simulation run, new variance values are calculated. Each simulation run takes around 50 min, thus, we limit total number of runs to 10.
To evaluate the uncertainty produced by inaccuracy of input data and model design we use counting data of bicycle and pedestrian traffic at permanent counting stations (Gpv -Günther Pichler Gmbh, 2020a, b, 2022. The counting data represents automatic and manual counts at 9 stations registering cyclists and 14 stations registering pedestrians. They are hourly and daily averages of measurements collected in October-November from between the years of 2012-2019. We compare the hourly traffic counts with observational data using the Mean Absolute Error and Pearson's correlation analysis. These measurements demonstrate the magnitude of error and the goodness-of-fit of results.

Results
Model results show that both bicycle and pedestrian traffic is concentrated along the river Salzach, being the most picturesque and comfortable way through the city uninterrupted by motorized traffic (Fig. 2,3).
The estimated experimental error variances for bicycle and pedestrian counts during stochastic uncertainty analysis do not vary considerably against increasing number of runs, meaning that accuracy does not improve with more runs.

Discussion and conclusion
This study aims at presenting the agent-based transport model that simulates bicycle and pedestrian traffic at a regional scale over a day. Existing transport models so far are either strongly dependent on large amounts of data or focused on microscale processes of bicycle and pedestrian movement. Our model is based on behavioural probabilistic rules that extend reusability and adoption of the model for different scenarios and independent of the study area and time.
Since the model has a general purpose of predicting traffic flow distribution under different scenarios, we use uncertainty analysis to evaluate the results against observational data, as validation analysis is impossible.
The uncertainty analysis shows moderate and strong temporal correlations of hourly counts, meaning that the temporal distribution of cyclists and pedestrians are successfully imitated the reality. The Mean Absolute Errors are significantly higher for cyclists rather than pedestrians, indicating a less accurate spatial distribution of cyclists over the network.
Discrepancies in output data can be attributed to the level of accuracy of input and observational data used for evaluation. Although, bikeability-based and walkabilitybased routing substantially improve the model's accuracy, there are more aspects in routing behaviour that can be included, such as streetlights, sunlight visibility, route straightness, and perception of distance.
The current state of the model simulates traffic of cyclists and pedestrians and is extendable to other modes of transport. The model can support planning decisions and be used as a playground for testing the scenarios of soft and hard interventions affecting traffic distributions.