Incorporating real-time data into agent-based crowd simulations using dynamic data assimilation
We are building an agent-based model of people’s movements through the Connected Places Smart Building in London, which is equipped with sensors. The model will incorporate real-time sensor data by establishing a method of dynamic data assimilation. This is not currently standard practice for crowd simulations. The project deals with preparing the sensor data for use in the model.
Data and methods
The source of the data are the sensors in the Smart Building in London. This building is a sensor testbed maintained by Connected Places Catapult. The sensors measure parameters such as CO2 levels, light levels, and noise levels which reflect the internal environment of the building. The data are available through an API. To build the model, the data must be accessible programmatically. This requires a means to access the API, a database to store the data, and a means to retrieve the data in order to plug it into the model.
The primary output of the project was a series of scripts written in Python and SQL. ‘scraper.py’ is a Python module for logging into and accessing the Smart Building API, and to retrieve data for storage in variables. It is also possible to plot figures from any sensor (Figure 1). This was accompanied by ‘scraperplot.py’ which is a script which uses ‘scraper.py’ to plot through options and input in the command line.
Scripts for creating an SQL database and storing data from the sensors collected using ‘scraper.py’ were created: ‘create_database.sql’ and ‘database.py’ (Figure 2). Lastly, ‘databaseplot.py’ is a user-friendly script which you can use to plot specific sensors and parameters from a specific time point, as well as aggregating sensor readings from a single room (Figure 3). The scripts, and documentation and notebooks for use, are available on github:
Also as part of this project, we conducted a review of software for agent-based modelling of crowd simulations:
Value of the research
This project forms part of the wider Data Assimilation for Agent-based Models (DUST) project, and has real-world implications for improving the efficiency of management of events within buildings.
- These are the first steps towards building an agent-based model of the Connected Places Smart Building
- The scripts generated enable data retrieval, storage, and plotting from the Smart Building API
Tom Richards, LIDA Intern
Nicholas Malleson, Professor of Geography, LIDA, University of Leeds
Jonathon Ward, Lecturer in Mathematics, LIDA, University of Leeds
Minh Kieu, Lecturer, The University of Auckland
Tamar Loach, Data Science Team Lead, Catapult
Connected Places Catapult
Part of the DUST project, funded by the European Research Council