Real-time agent-based crowd simulation with the Reversible Jump Unscented Kalman Filter☆
Introduction
Agent based models (ABMs) have become a popular method for simulating the dynamics of crowds [1], [2] due to their ability to readily simulate individuals and their behaviour. In general, such models are calibrated to historical data and then used to make predictions. However, ABMs rarely incorporate any real-time data [3], so cannot reflect changes within the target system that occur in real time. This prohibits their use as real-time management tools, limiting them to conducting offline experiments based on historical data. If ABMs were able to update their current state based on up-to-date information from the real-world, as is common in fields such as meteorology [4], then they could become valuable tools for the management of crowds in busy places such as public transport hubs, shopping centres, or high streets.
To address this limitation, data assimilation techniques have been proposed as a way to incorporate new data into predictive ABMs. The Unscented Kalman Filter (UKF), in particular, is a method that could operate effectively without requiring a large number of model replicas to be run simultaneously (an ‘ensemble’) which is important as ABMs are typically extremely computationally expensive [5]. However, the vanilla implementation of the UKF has a number of limitations. In particular, the UKF is designed only for assimilating states with a Gaussian distribution – such as an agent’s location in real space – not categorical or discrete variables. Most ABMs have mixed states of both categorical and continuous variables with comparable importance [6], [7]. In models of crowds, for example, agents may have categorical variables to represent their gender [8], beliefs [9], destination [10], etc. These variables can define a totally different set of behaviours for each class of agent, so should not be disregarded as part of a data assimilation framework.
There is very limited research that deals data assimilation for ABMs, and even less that attempts to tackle the problem of combining continuous and categorical variables. This partly stems from the fact that advances in data assimilation have traditionally emerged from fields such as meteorology and hydrology, where models rarely incorporate categorical variables [4]. In short, there are two main problems that limit the veracity of current techniques. First, the model selection method, which is commonly used to deal with categorical variables, will struggle with the ‘curse of dimensionality’ that comes with categorical variables. For example, given an ABM with 10 agents each having a single categorical variable with 5 possible values, there are (nearly 10 million) different combinations of categories. Second, typical data assimilation frameworks require each individual model realisation to have the same parameter dimensions. Because each agent has its own local parameter values, adding or removing agents from a model has the effect of changing the number of model parameters. This complicates the implementation of data assimilation with ABMs, as it is common for the number of agents to vary between model runs.
This paper extends the state-of-the-art by proposing a method that allows an Unscented Kalman Filter (UKF) to conduct data assimilation on an agent-based model that consists of a mixed state of categorical and Gaussian variables. The method, which we call Reversible Jump UKF (RJUKF) is inspired by Reversible Jump Markov Chain Monte Carlo (RJMCMC) [11]. Compared to similar techniques for mixed state estimation, the RJUKF has the advantage of being efficient enough for online (i.e. real-time) application. This method is also able to handle variable dimension models making it suitable for application to ABMs.
The approach is demonstrated in the context of estimating the behaviour of a crowd of people as they traverse a train station – specifically Grand Central Terminal in New York City – using an agent-based model, StationSim. The model of the crowd will inevitably diverge from the ‘true’ behaviour of the crowd for two reasons: (i) the trajectories of the pedestrians vary stochastically as they interact with each other; and (ii) although we assume an individual’s time and location of entry into the station are known (people are often recorded as they pass through barriers to enter a station), we cannot assume their destination is known, so this must be inferred from their evolving trajectories. The incorporation of up-to-date observations from the real world using an Unscented Kalman Filter can help to estimate the true locations of the pedestrians, but it cannot estimate the true destinations because these are categorical rather than continuous variables. For this, the RJUKF is needed. Experiments are presented to show that the RJUKF is able to estimate both location and destination, creating a much more robust real-time simulation of the station.
This paper is structured as follows: Section 2 reviews the relevant literature; Section 3 outlines the methods used, including a description of the agent-based model and the RJUKF; Section 4 outlines the experiments and results; and Section 5 draws conclusions and outlines potential future work.
Section snippets
Related work
The aim of Data Assimilation (DA) is to use current, real-world observations to update the internal state of a model. In this manner, “all the available information” [12] is used to create a combined representation of a system that is closer to its true state than either the observations or the model in isolation. Recent efforts have been made to develop methods that will allow ABMs to react to real-world events as they happen. Whilst promising, they exhibit a number of limitations such as: the
Reversible Jump Unscented Kalman Filter (RJUKF)
The main innovation offered by this paper is the introduction of the Reversible Jump Unscented Kalman Filter (RJUKF). We propose a combination of Reversible Jump Markov Chain Monte Carlo (RJMCMC) [11] with the Unscented Kalman Filter (UKF) as a means of conducting data assimilation utilising an efficient algorithm, the UKF, to estimate both categorical and Gaussian agent attributes in real time.
For example, in the StationSim agent-based model that simulates agents crossing a train station
Experiments
Two experiments are conducted to illustrate the efficacy of the proposed method. The first establishes the feasibility of applying the UKF to an ABM. The final experiment demonstrates the application of the UKF with categorical variables; i.e. using the RJUKF method. In the first experiment we assume that the agents’ destinations are known, so the filter only needs to correct for the noise introduced as agents collide and deviate from their otherwise straight paths. In the second experiment we
Conclusions
This paper has demonstrated how the combination of an Unscented Kalman Filter (UKF) and elements of the Reversible Jump MCMC algorithm can be combined to create an efficient algorithm that can scan a set of filters (parameterised by categorical variables) and filter over continuous variables simultaneously. This offers an advantage over previous attempts to conduct data assimilation on agent-based models that have largely used particle filters [10], [14], [15], [20] as the UKF can perform well
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
References (56)
- et al.
A data-driven agent-based model of congestion and scaling dynamics of rapid transit systems
J. Comput. Sci.
(2015) - et al.
Data assimilation in agent based simulation of smart environments using particle filters
Simul. Model. Pract. Theory
(2015) Nonlinear filtering: Interacting particle resolution
C. R. L’Acad. Sci. I. Math.
(1997)- et al.
Multiple model Kalman filter for attitude determination of precision pointing spacecraft
Acta Astronaut.
(2011) - et al.
Exploring the behavior space of agent-based simulation models using random forest metamodels and sequential sampling
Simul. Model. Pract. Theory
(2019) - et al.
Finite element model updating using simulated annealing hybridized with unscented Kalman filter
Comput. Struct.
(2016) - et al.
A social force evacuation model driven by video data
Simul. Model. Pract. Theory
(2018) Agent-based modeling
- et al.
Crowd simulation and its applications: recent advances
J. Comput. Sci. Tech.
(2014) - et al.
Dynamic calibration of agent-based models using data assimilation
R. Soc. Open Sci.
(2016)
Atmospheric Modeling, Data Assimilation and Predictability
The unscented Kalman filter for nonlinear estimation
Revealing COVID-19 transmission in Australia by SARS-CoV-2 genome sequencing and agent-based modeling
Nature Med.
26. Simulation analytics for social and behavioral modeling
Social-Behav. Model. Complex Syst.
Simulating crowd evacuation with socio-cultural, cognitive, and emotional elements
Understanding collective crowd behaviors: Learning a mixture model of dynamic pedestrian-agents
Simulating crowds in real time with agent-based modelling and a particle filter
J. Artif. Soc. Soc. Simul.
Reversible jump Markov chain Monte Carlo computation and Bayesian model determination
Biometrika
The use of adjoint equations in numerical modelling of the atmospheric circulation
Dealing with uncertainty in agent-based models for short-term predictions
R. Soc. Open Sci.
Exploring data assimilation and forecasting issues for an urban crime model
European J. Appl. Math.
Predicting migratory corridors of white storks, ciconia ciconia, to enhance sustainable wind energy planning: a data-driven agent-based model
Sustainability
The ensemble Kalman filter: Theoretical formulation and practical implementation
Ocean Dyn.
Who goes there? using an agent-based simulation for tracking population movement
Using data assimilation to reduce uncertainty in an agent-based pedestrian simulations in real time
Philos. Trans. A
A new approach to linear filtering and prediction problems
J. Basic Eng.
Dynamic Map Building and Localization: New Theoretical Foundations
Towards real-time crowd simulation under uncertainty using an agent-based model and an unscented Kalman filter
Cited by (11)
A Prescriptive Simulation Framework with Realistic Behavioural Modelling for Emergency Evacuations
2024, ACM Transactions on Modeling and Computer SimulationOn learning agent-based models from data
2023, Scientific ReportsData Assimilation for Agent-Based Models
2023, Mathematics
- ☆
This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 757455), through a UK Economic and Social Research Council (ESRC) Future Research Leaders grant (ES/L009900/1), and through an internship funded by the UK Leeds Institute for Data Analytics (LIDA) . Computation was undertaken on ARC4, part of the High Performance Computing facilities at the University of Leeds, UK.