Abstract

In this paper, the Camp Nou stadium is used as a testbed for City Physiology, a theoretical framework for urban digital twins. With this case study, the modularity and adaptability of the framework, originally intended for city-scale simulations, are tested on a large facility venue. As a proof of concept, several statistical techniques and an agent-based simulation platform are coupled to simulate a crowd in the stadium, and a process of four steps is followed to build the case study. Both the conceptual (interdomain) and technical (domain specific) layers of the digital twin are defined and connected in a nonlinear process so that they represent the complexity of the object to be simulated. The result obtained is a strategy to build a digital twin from the domain point of view, paving the way for more complex, more ambitious simulators.

1. Introduction

In urban studies, the concept of coupled simulations [1] is common but is considered for resolving specific problems at a niche level. These are usually technical problems, e.g., performance issues. The coupling problem has already been studied widely from a software approach, whereas this paper is focused on studying which domains are involved in the coupling process from a conceptual approach.

Since countless services and activities are condensed within a city, several of its aspects belong to different disciplines, without explicitly referring to the city domain [2]. Integrating data from different domains and sources is necessary for any coupled simulation. However, data usually come from heterogeneous sources, and thus, it is not fit to be used by different domains simultaneously. As a sort of data-cleaning process, data integration might require the reformatting of data already available so that they can fit different domains.

The ultimate goal of a simulation is to be measurable; hence, it is useful to choose an interdomain language to set its structure so that experts from different domains can understand it. Here, City Physiology, a “framework for holistic city simulations” [3], is proposed as a basis. The framework defines systems or layers, which are made of elementary units interacting in such a way that complex behavior can emerge, and interactions that are “a data exchange between different systems. It occurs between the input/output data of different systems. When data from System A work as input data for simulating System B, an interaction takes place. Furthermore, when at the same time, using data from System B improves the outputs of System A, then a strong interaction takes place, which is also called feedback cycle” [3].

Here, the City Physiology framework, originally intended for city-scale, is used at a scale considerably smaller than the urban one. The change of scale is in physical size but not in population, since the stadium of the Fútbol Club Barcelona (FCB) has 90k seats, that is more than a small city’s population, at least in the European context; according to the degree of urbanization [4], the threshold is 50k. In fact, compared to Spanish municipalities, a city of 90k would rank 73 out of the 1303 cities, listed by population size [5]. Stadiums are not the only buildings where the boundaries between building and urban context are blurred. Some of these typologies allow experimentation with the urban reality within one building, the most obvious being the vertical city concept [6, 7], as well as shopping malls as commercial axes.

Considering the latter, the historical existence of the covered bazaar is tangible proof of the urban similarity between an enclosed building and a commercial axis [8]. Another positive example is the Illa Diagonal block, built not far from the FCB stadium, that works as a “city within a building” [9]. Different-scale buildings arise around a central void, the main one is the size of a lying-down skyscraper, and serve a mixed use (commercial, business, hospitality, and leisure) [9, 10]. The connection between the main street and the interior of the block is possible thanks to a road crossing the underground floor that is open to traffic, and especially thanks to the permeability of the ground floor, where a central interior commercial street is crossed by several pedestrian paths [9, 10].

Shopping centres are often described and studied as alternative “public” spaces, where citizens can meet and participate in economic activities in areas where the quality of urban planning is minimal [11, 12]. On the other hand, the quality and impact on the urban fabric of these buildings is still questioned because of their tendency to isolate themselves from the city fabric, and their unfriendly urban mobility requirements [8]. It is therefore relevant to continue with a comparative analysis, which allows us to better understand this type of large facility venues through urban complexity, as proposed by the present research, and to better propose changes to the building ensuring higher quality urban integration.

This project has been developed within the Horizon 2020 European project IoTwins, “Distributed and Edge-based Industrial Twins for SMEs: a Big Data Platform” [13], where one of the large-scale test-beds involves building a digital twin of the FCB stadium (Camp Nou) and the surrounding area. This paper is a case study on how to structure a digital twin for a large urban facility using the City Physiology framework. The integration of simulations as the junction of different domains, made possible through data integration, is analyzed. In order to guarantee interoperability between two systems A and B, it has to be sure that the output of system A works as input for system B, or vice versa. This paper shows, through the case study, how to understand what input systems need, and what output they can provide, in order to build an input-output pipeline of integrated simulations that works between different domains.

As a proof of concept, several statistical data analysis techniques and an agent-based simulation platform are coupled to simulate a stadium. The following steps are followed to build the case study: determination of data requirements mapped to City Physiology, definition and implementation of conceptual and technical layers, identification of interacting layers and development of their simulations, and interpretation of simulation results and identification of actionable insights.

Digital twins are usually tailored to a specific city. The work in building a city’s digital twin usually starts with linking a 3D city model with data in a visual representation of the city state, sometimes providing the possibility to remotely control some actuators. Even when the digital twins are used in planning evaluation or prediction of scenarios, they lack a generic city theory; so they are more often related to a technical-infrastructural effort, rather than being supported by a comprehensive theory about cities. For example, the digital twin of Vienna [14] is focused on geometry and its different levels of detail. In other examples, such as Herrenberg [15, 16], Stuttgart [17], and Helsinki [18], the digital twin is used for the prediction of scenarios but is focused on specific domains of the city (e.g., traffic and air pollution simulations to test their urban planning impact), thus hindering the study of complex city dynamics.

Compared to our work, existing urban digital twins are generally more advanced in terms of connection between the physical (the real city) and the digital twin: they usually consider automated data streaming and feedback loops, and powerful visualizations. On the other hand, they connect city layers ad-hoc, instead of following a conceptually solid layers’ organization. Our approach, instead, aims to be valid universally, not only locally; therefore it establishes a theoretical basis which is both sufficiently generic to describe any city, and comprehensive enough to cover and properly describe the city functioning in toto.

The main contribution of this article is a testbed of how to build a digital twin from the domain point of view. The theoretical framework for our digital twin is adjustable and modular by design, and as every module is replaceable, the digital twin is extensible and transferable to other domains, while allowing the reuse of preexisting models. On a lower level, focusing on the simulation itself, the way in which simulations are used at the junctions of different domains is shown, and, even though their results have not yet been validated, how the simulations work within the input-output pipeline can be evaluated.

This article is structured as follows. Section 2 is called “City Physiology in practice” and describes all the steps taken to apply the City Physiology framework to the case study. The first step of the case study (Section 2.1) consists of identifying which conceptual layers of City Physiology are available for the simulation, according to the data available and the aim of the case study. The second step (Section 2.2) consists of defining both the conceptual and technical layers of the digital twin, and understanding how to connect them so that they represent the complexity of the object to be simulated. The process of arranging the layers together is not a linear one, and two approaches (the conceptual and the technical) are built up at the same time. After both layers have been defined, the interactions between layers are built (the simulation phases of Section 2.3. The last step Section 2.4, the interpretation of the simulation results, is useful for the understanding and adapting of the results to answer the questions arising from the digital twin, and in identifying actionable insights. This is followed by Section 3, where both results and lessons learned about the Camp Nou case study and the methodology of City Physiology are discussed.

2. City Physiology in Practice

The cornerstone of the structure is the City Physiology framework, which defines “six infrastructure layers that enable flows from/to and within a city (Communication Network, Water Cycle, Energy Cycle, Matter Cycle, Mobility Network, and Nature), the Built Domain, Society, and Environment” [3]. This structure is based on the theoretical city model of the City Anatomy developed by the City Protocol Society (CPS) [1921], and it is inspired by how physiology studies the way the systems of a body work, and how they are interrelated to each other [3].

2.1. Step 1: Mapping Available Data to City Physiology Layers

The data available and the aim of the case study define which conceptual layers of the City Physiology are available for simulation (see Figure 1). The definition of the case study determines the target layer, which is the Built Domain. The real city (the Physical Twin) produces the data available. The data belong to two of the nine layers that the City Physiology identifies as the fundamental systems of a city: the Communication Network and the Built Domain, which is also the target layer. Choosing an interdomain language, such as the conceptual layers of the City Physiology, allows us to standardize the vocabulary among the different profiles needed to define the technical details of the digital twin, for instance, computer scientists, policy makers, citizens, architects, and lawyers. This common language is used so that experts from different domains can understand the structure and goals of the simulation, while leaving the technical layers, typical of the simulation domain, to a second step.

Given that the aim of this case study is to structure the digital twin of a stadium, the target layer is the Built Domain, where the results regarding spatial properties of the facility will be studied, such as hotspots and bottlenecks that arise during arrival and evacuation scenarios on match days. We could argue that the outcome of the digital twin belongs to either the Built Domain or the Society layer, as they relate to the interaction between the crowd (Society) and the space (Built Domain). Given the complexity of the object we are studying, when two or more layers interact among them, changes that happen in one layer are affecting the state of the others as well. Consequently, if the output of the digital twin is targeted at one layer, the actions undertaken (e.g., changing the space configuration) may affect others (e.g., the social behavior of visitors). However, the feedback cycle between the digital and the physical twins is not automated: to reflect this change of state, the twins need to interact through the intervention and decision-making of the end user, called the actionable insights. We chose to identify our target layer as the Built Domain because we want to study spatial properties, but choosing the Society layer would not change the methodology of the next steps; we would only need to change the target layer and calculate different metrics to reflect the change of perspective.

Data from both the same Built Domain layer and the Communication Network are available, as detailed next.

2.1.1. Communication Network

The Communication Network layer enables, among other activities, the study of behavioral data. In this case study, there are two sources of data: public and private data. The publicly accessible data were collected from Foursquare [22], and are composed of millions of anonymised records of worldwide check-ins between 2012 and 2014. Foursquare allowed its users to broadcast their positions to the social network in the form of a check-in, that is, a record such as “user A was in place B at date C.” This includes check-ins in Barcelona and at Camp Nou [23]. The private data consist of aggregated Mobile Phone Data, obtained from an agreement between the Barcelona City Council and Vodafone [24]. This dataset contains anonymised visitor statistics classified by type, demographic features (i.e., age cohort and gender), and geographic features (areas of the city, but not at the venue level).

2.1.2. Built Domain

The Built Domain layer considers two main sources: sensor data and space configuration data. There are mainly five sensor data sources of information provided by the end user of the case study and owner of the venue, Fútbol Club Barcelona (FCB).(i)Match register. This dataset contains a curated list of all the matches played at the FCB premises since the 2010–2011 season, including the Camp Nou stadium, the Johan Cruyff stadium, and the Palau Blaugrana sports hall.(ii)Camp Nou entries. This dataset is composed of all the registered entries to the stadium during match days, including all visitors, staff, and press, among others. The granularity of the data enables accurate estimates and modelling of the arrivals at Camp Nou during match days.(iii)Tickets sold. This dataset contains information about all the tickets sold for Camp Nou (online and in person). It includes many variables such as the purchase date, the zone of the stadium, inlet, etc., and can be linked with the entries dataset.(iv)Seats released by subscribed members. The way Camp Nou seats work is that the seats are associated with FCB annual memberships, and thus, these are reserved for the season. In case a member decides to release his or her seat for a particular match, the corresponding ticket can be purchased by a new visitor. Data include the release time of the seat and can be linked to the time of the purchase and the entries dataset.(v)FCB Annual Memberships. This dataset contains information about the annual memberships, and thus it allows us to know the exact place and seat allocated for a person during a given season, and also the type of visitor to the stadium, which is relevant because subscribed members are likely to behave differently from tourists.

The space configuration information is extracted from the facility plans that are provided for each floor of the stadium in Autocad [25] DWG format. Each DWG file contains the following layers of objects: permanent obstacles to the circulation of people (such as walls and pillars), removable obstacles (such as stadium seating), architectural elements for vertical circulation from one floor to another (such as stairs and slopes), vertical circulation elements within the same floor (such as few-step stairs and small slopes), doors, their direction of opening, and a text layer with descriptive labels.

2.2. Step 2: Building Conceptual and Technical Layers

The second step consists of defining both conceptual and technical layers of the digital twin, and understanding how to connect them so that they represent the complexity of the object to be simulated. There are two approaches to assemble the layers: conceptual, that is, interdomain, and technical, that is, domain specific (see Figure 2).

The process of arranging the layers together is not linear, and the two approaches are built up at the same time. The technical approach is usually preferred in the simulation field but it is domain specific, while the conceptual approach is complementary and uses an interdomain universal language. The modularity of the framework is such that both the content and the quantity of layers may vary, being adaptable to each specific case study.

The particular process used in our case study is as follows. At the top level, potential spatial properties of the stadium are seen through ad-hoc machine learning metrics and visualization (see “level A, Target layer and results” of Figure 2).

The Built Domain influences how people (the Society of the stadium) move around the space. Attendance at large venues is a complex process to model, and agent-based simulations have been chosen to do this. Every agent simulates a person in the stadium. Agents can appear and act in a variety of forms, depending on the characteristics of the venue, the facility management policies, and the behavior of users that interact with each other. Thanks to the large amount of data available from past years, realistic scenarios can be analyzed and approximated, where agents simulate people’s trajectories through the stadium, resembling real scenarios from the past, and thus predicting the future behavior of agents (see “level B, Simulation of scenarios” of Figure 2).

Using historical sensor data, the expected number of people that arrive at each gate or section of the stadium can be estimated with statistical techniques. In addition, the arrival of all the agents can be modeled, at different times before and after the match, as well as their behavior (see “level C, Processing of inputs” of Figure 2).

By knowing the different profiles of people that come to the stadium, different types of agents can be simulated, e.g., locals or tourists, and thus more realistic scenarios can be produced, including specific behaviors for each agent type. For example, a tourist would be expected to arrive earlier at a match, and possibly move around the stadium while taking pictures, while a local or frequent visitor would be expected to arrive in the last twenty minutes before the match, and know exactly where to go without distractions. These behavioral characteristics are inferred from sensors and communication network data (see “level D, Inputs” of Figure 2).

2.3. Step 3: Defining Interactions and Simulations

Once both the technical and the conceptual approaches have been defined, the focus moves on to the details of how to build the layers, the interactions between them, and other simulation parameters. Interactions are considered as a transfer of information between layers, where each layer should internally develop the necessary tools to adapt the output of other layers to its own requirements. The methodology applied to simulate each layer is explained below, together with how the interactions take place (see Figure 3).

There are two main simulation phases (see level B and C of Figure 3). First, the Society layer is simulated with statistical models the input of which is the data from Communication Network and Built Domain layers. In fact, digital traces from the Communication Network are used to extract behavioral data about facility visitors. Together with behavioral data, the sensor data (ascribed to the Built Domain) is used to discover the behavioral rules that describe the population visiting the facility (the Society). Second, the spectator profiling (resulting from the Society layer) and space configuration data (Built Domain) are used to simulate arrival and evacuation scenarios (that belong to the Society layer). An additional third phase might be required to validate the simulation results, but, at the time of writing, the focus of the paper was the strategy to design and build the case study rather than its specific results.

2.3.1. Spectator Profiling (Society Layer)

The first phase is the simulation of the Society layer, combining the behavioral data from the Communication Network and the sensor data from the Built Domain, to define the behavioral characteristics of the spectators. These characteristics of the Camp Nou visitors will be used as input parameters for the agent-based simulation in the next simulation phase. This article defines a simulation phase as any step that requires the adaptation and transformation of the information after an interaction between city layers takes place, whether a simulation engine is used or not. The modelling choice was made on the availability of specific datasets and, this article being a case study, they may vary when applying the framework in a different context. Consequently, this simulation phase contains all techniques necessary to reproduce the Society layer, while maintaining the generality and modularity traits of the framework. To simulate the Society layer (see level C of Figure 3), several data-driven analyses are run with the aim of modelling visitors’ attendance to the facility and inferring the demographic and origin of visitors:(i)Demographic attributes of data are inferred from mobile phone data;(ii)The origin of visitors is inferred from Foursquare data;(iii)The influx characterization is inferred from the ticketing information.

To infer the demographic and origin of visitors, the information about gender, age, and residence (either local or a tourist) is analyzed. To identify the demographic attributes of visitors to Camp Nou, the results of a previous study [24] are improved using a mobile phone dataset from 2018 created by the mobile phone operator Vodafone for the Barcelona City Hall. The dataset contains aggregated visitor counts in several areas of the city, based on the information gathered from cellular antennas across the city. The number of people in a given area is provided according to gender, several age cohorts, and tourists (national and foreign) or locals (residents from the Barcelona Metropolitan Area). The distribution of women, elderly, and tourists in the city is provided as a result (see Figure 4). To obtain this, local metrics are first calculated independently for each specific cell of a grid, and later compared with nearby areas with similar values.

The Camp Nou area in the western part of the city is marked with a circle in Figure 4(c). As seen in this figure, spatial information is aggregated in grid cells, based on cellular antennas. However, the size of each grid cell (500 m × 500 m) contains considerably more than the stadium, and connection patterns in mobile phones do not guarantee that each device is connected to the nearest cell station. Thus, the dataset requires preprocessing, such as removing the constant signal level coming from the normal activity in the neighbourhood.

The dataset already includes a measure of the number of local and tourist visitors at each grid cell, which is adapted to the venue [24]. However, the tourist category is severely biased by the availability of the mobile operator in foreign countries. For instance, according to the data, there were no visitors from China, although FCB knows from its records that Chinese tourists frequently visit their locations. Hence, the distribution found in this behavioral dataset is balanced using another behavioral dataset from the Foursquare social network. This not only helps in reducing the bias of the phone dataset but also makes it possible to build a spatiotemporal trajectory for all users in the Foursquare dataset (see Figure 5), and to focus on users who have visited a particular location (Camp Nou in this case). Although the data are anonymised, the users’ country of origin can be inferred based on their trajectories, under the assumption that many of them have more check-ins at their countries than in tourist destinations. In addition, residents from the Metropolitan Area may have a check-in at their own homes. Hence, a visitor-venue matrix is built for all check-ins in Barcelona, and then the distribution of locals/tourists is determined from this matrix [26, 27] and from the inferred country of origin of some visitors, based on semi-supervised machine learning techniques.

This dataset enables us to estimate distributions of time of arrival according to visitor origin, as well as to estimate visitor counts for nonmatch days (see Figure 6). Although the time-of-arrival distribution from the official ticketing data prevails, this dataset gives us a different perspective, as it is possible to relate time of arrival to the previous and following activities performed by each visitor. This is relevant for the simulation, as, for example, knowing which percentage of visitors have checked in at a certain restaurant just before their visit might give clues to classify the visitor as either tourist or local. Therefore, the corresponding mobility pattern (tourist or local) will be given to the agent inside the stadium in the Agent-Based Model [28].

Next, to model visitors’ attendance, the Influx Characterization parameter is studied, which is the distribution of the number of visitors and their arrival times at different types of events (e.g., Regular season matches vs. Champions league matches).

The sensor data mentioned above provides insights about the spectators and the matches. From this dataset, 111 matches were extracted, played during the four seasons between 2016 and 2020 at the Camp Nou stadium. The average number of visitors per match on a match day to the stadium was 72,919, with a standard deviation of 18,157. Three of the matches show a suspiciously low number of visitors, but two of those occurred in June 2020 after the lockdown due to the COVID-19 pandemic in March, hence the low number of visitors is reasonable. The third match was considered an outlier and thus discarded to avoid biasing our estimates of future attendance. Hence, 110 of the matches were used for the modelling of the arrivals. Figure 7 shows the aggregated number of arrivals at the Camp Nou premises per minute relative to the start of the match, for all the matches during the 2016–2017, 2017–2018, 2018–2019, and 2019–2020 seasons.

To predict overall match attendance, several features were created using the match register data such as the time of the match, the day of the week, the competition of the match, the opponent, if it was a derby, if it was played during local holidays, if it was after the lockdown after the COVID-19 pandemic, the match day, the month of the year, and the season of the year. Matches are also classified by similarity in arrival patterns (applying unsupervised machine learning k-means clustering in the arrival time series), which are used as a proxy of the popularity or branding of the opponents, as it is one of the most relevant predictors of attendance [29].

The spatiotemporal forecast of the attendance per minute to the stadium was computed from the “Camp Nou entries” dataset, obtaining the number of arrivals per minute and per gate. Also relevant is the prediction of the overall attendance, which is the sum of the number of visitors over a match day for any given match.

2.3.2. Simulation of Arrival and Evacuation Scenarios (Society)

The second simulation phase belongs, as well as the first, to the Society layer. It combines the output of the spectator profiling with space configuration information from the Built Domain to run agent-based simulations of arrival and evacuation scenarios of people visiting the stadium facility; see level B of Figure 3.

The simulation is implemented using the open source platform Pandora [30, 31]. As part of the Europen Horizon 2020 IoTwins project [13], Pandora received several improvements in the implementation are introduced that relate to satisfy the requirements of the crowd simulation in the stadium:(i)The ability to run the simulation of several venue levels simultaneously;(ii)Spatial partition optimization (see description below) to execute the simulation of agent interactions in parallel.

Before running the simulation of the scenarios, several actions are implemented to set and prepare the integration of data from the previous simulation phase:(i)Discretization and conversion of facility plans (from Built Domain);(ii)Profiling of agents (from first simulation phase of Society);(iii)Defining behavioral rules;(iv)Spatial partition optimization.

Facility plans are abstracted to create a virtual representation of the stadium that is compatible with Pandora. First, DWG plans are reviewed for consistency: obstacles to horizontal displacement are checked (e.g., beams may result being depicted as obstacles like walls, given the export process to DWG, when they are indeed above the walkable floor) and vertical displacement elements are verified to match between floors (given the complexity of the stadium architecture). Secondly, the drawings are simplified and all the elements are manually rearranged in Autocad layers and assigned color codes, according to the requirements of the Pandora simulator. Finally, the plans are exported and pixelated at a specific scale (1 pixel = 20 cm) so that every pixel contains a different piece of information about the environment for the agent in the simulation.

The results from the spectator profiling are converted into Pandora’s parameters so that tourists differ from locals in their familiarity with the facility, they are distracted more easily from their main target and stop more frequently (to check where they are going, to take pictures, etc.), and tend to follow the crowd. Compared to locals, Pandora considers tourists to have a higher probability of not following the optimal path and a higher interest factor. Other parameters include walking speed, whether or not the agent follows someone else or is independent, and whether the agent makes stops or detours before reaching the target. See Table 1 for a description of the parameters that are used to define the behavioral profile. Future improvements to the agents’ behavior are the inclusion of group dynamics and interactions between tourists and locals.

The agents follow a pedestrian movement model [32] for two distinct scenarios: a usual day at the facility, be it a match day or a regular day, and an emergency situation that requires a stadium evacuation. The overall decision process that agents follow during the simulation has a shared structure in all scenarios, as depicted in Figure 8. First, the agents update their knowledge of their environment within their vision. Each agent has a defined immediate target, depending on which scenario is being simulated; according to that, the agent chooses one of the three main branches of the decision process. Depending on its knowledge, attributes, and surroundings, the agent performs a series of actions within each step of the simulation [33].

The first step of the process is to decide whether agents have reached their targets (either an exit or their assigned seats). In the case of exits, the agent exits the simulation; within a match, the agent stays in place just as a spectator would to. Otherwise, the agent needs to choose what to do. Three choices are available: to stay in place, to move randomly (to wander), and to move toward the destination. The strategy to do so depends on various factors and group dynamics. Depending on the personal attributes of each agent, they may follow the optimal path or they may follow the crowd around them. This includes some code-level optimizations that trade-off accuracy in the optimal path estimation with simulation performance, while maintaining a coherent and accurate movement of the agents [34]. Arguably, this trade-off enhances the simulation as it provides a better approximation of the mobility of spectators. For example, many people get distracted and move in an optimal way just in their line of sight or for short periods of time, then when they realize where they need to go, they recalculate the optimal path within these parameters. However, in some situations, people just follow the trend they see around them.

When determining the path toward their targets, agents identify intermediary destinations. For instance, in exit scenarios, they all set their target to the nearest exit doors. If there are no close exit doors, the targets are set to the closest stairs to another level. Then, all agents follow the aforementioned strategy regarding optimal paths and crowd behavior. Since one of our objectives is to determine bottlenecks within the venue, following this strategy stresses the simulation on the areas that can present more threats in a real evacuation situation [35].

Finally, in large-scale simulations, an agent decision process that relies on interactions with other agents (such as avoiding collisions) may have performance issues. A method to develop the simulation in parallel has been developed, based on the concept of space partitioning [36]: each level of the stadium has been split in terms of physical 2D space. The partitioning algorithm tries to split the space in a balanced way, considering the current state of the agents (their position and type, mainly). From there on, the simulation runs in parallel, i.e., agents being executed simultaneously in time. To do this, the solution that has been developed considers the problems regarding overlap surfaces [37], ghosts agents [38], and agents synchronization. Further details about the spatial partition optimization process are beyond the scope of this paper.

2.4. Step 4: Interpretation of Simulation Results and Applications

The primary objective of this digital twin is to answer facility management questions, and the results of the simulation need to be interpreted and adapted in order to do so. We consider that the presentation of results and the creation of insight are integral parts of a digital twin, and thus this section is devoted to define how to interpret the results of the Camp Nou digital twin in two scenarios defined jointly by researchers and end-users of the system. These scenarios are the arrival of visitors to the stadium, and the evacuation of the stadium during a match. Both scenarios are commonly analyzed in static terms, although a simulation approach would enable planners to perform an optimal and on-demand assignment of resources under (un)expected circumstances, as well as planning for the safety of visitors under in-situ stadium renewals.

Notice that while each layer of the digital twin might produce results on its own, to convert these results into actionable insights might require them to be adapted, converted, or mixed with results from other layers in order to be useful. For example, the raw outputs of the Society layer simulators are the location of every agent at every step. From this information, different metrics can be extracted, both for agents and classes of visitors, such as the most visited or crowded places (see examples in Table 2). These metrics are visually translated to maps, so that the spatial properties of the stadium and their interactions with the crowd behavior are made evident.

By considering spatial properties such as hotspots and bottlenecks, it is possible to estimate agglomeration and queues, and then exploit this information to manage the space, the staff, and the material resources of the stadium.

As for space management, it is possible to measure density near turnstiles, and consequently increase the available doors or redirect match attendees towards less crowded security check-points, gates, and inlets using signals or personalized notifications (this last option requires the improvement of the notification system through a mobile app, already existing for staff and club members but not for all visitors). In addition, to facilitate the safety distance in a post-covid partial-opening scenario, visitors could be redirected towards less crowded sectors that are left empty.

Another interesting situation are renovations or remodelings of the stadium, especially if a renovation will coexist with audience and sports competitions, because the change in spatial properties or the constrained mobility can affect the ability to comply with safety regulations, and the reduced capacity will also affect staff, services, and commercial offer positioning. As an example, the current renewal project of the Camp Nou stadium considers demolishing the first security ring to transform the lot into a permeable semi-public space where neighbours are allowed to cross freely; potential new agglomerations may arise and the new scenario needs to be validated for security reasons.

An action to increase selling points visibility could be reallocating them near the most visited spots, while, to reduce agglomeration and queues, selling points and bathrooms could be opened (or closed) according to sector affluence (having service requests and selling data would improve reallocation).

The management of the staff working on the premises can benefit from the calculated spatial properties by redistributing the staff towards queues, to speed-up the arrival process, and to the most crowded sectors, to improve surveillance during match and evacuation (the surveillance reallocation needs to be validated in real-time and coordinated with the emergency and security authorities, who always attend and supervise the operation of any match in the stadium). Different scenarios can be considered, such as emergency evacuation, stadium renewals, concerts, and other nonfootball events. For example, during emergencies, partial and controlled evacuations can be considered. While the threatened sectors are evacuated, the others are safely confined, avoiding the agglomerations that arise in a full-scale evacuation, that affect the neighborhood traffic and slow down the arrival of emergency services.

Furthermore, in a post-COVID scenario, agglomeration can be used to plan the coordination of the sanitation staff as required by regulations, based on the expected affluence to each sector of the stadium.

Material resources’ management can also benefit from spatial properties information, when improved with attendance forecast and selling data, to optimize the commercial offer by redistributing food, beverages, and merchandising from less to more visited selling points.

Finally, if the resulting interpretations are nonactionable or inconclusive (which can happen for a multitude of different reasons such as bad time planning, lack of validation, and new city layers being added), both conceptual and technical layers should be refactored (step #2 of Section 2.2), either at the top level only, at the metrics level, or more deeply at the level of the simulation or its output.

3. Results and Discussion

The process of putting into practice City Physiology showed that the main obstacle to its applicability is the blended boundaries of city data. Even though City Physiology provides a subdivision of city elements, activities and services between layers, the data that they produce and use are not that clearly separable. It was necessary to identify which layer prevails in City Physiology logic when the layers are not the same: whether it be the layers that produce data or the layers that use that data, because the nature of data is not always easily reconductible to only one conceptual layer. On the other hand, the framework allows this differentiation and it allows both layers to be valid and necessary, given that reconducting data to its minimal elements is not always possible.

Furthermore, the development of the simulation tasks highlighted problems that reverberated to the practicability of the conceptual approach, in particular:(i)Interactions are considered passive transfers of information between layers, so each layer has to internally develop the necessary tools to adapt the output of the previous simulation phase to its own requirements. In fact, input/output formats are crafted ad-hoc to match the other layers in the best way possible, are case specific and not general enough to be applicable to other case studies as they are. The content of technical layers can consequently heavily modify the structure of the conceptual layers.(ii)Data conversion required a huge effort. For example, although the FCB had space configuration data of the facility ready to go, the format was not readily suitable for the simulation methodology. More generally speaking, the variety of formats the information can be provided is an obstacle to the simulation of city layers and for a smooth interaction between layers.(iii)The agent-based simulation methodology required an approximation of space configuration data that were hard to keep under control for a building as complex as a stadium, where elements at different scales coexist. The pixelation process aims at optimizing the simulation computationally by simplifying irrelevant pieces of information, but it is hard to evaluate a priori what is an oversimplification that eliminates architectural elements that are not obviously relevant at the scales considered (e.g., doors are significantly smaller than the stadium, but if their doorstep width does not allow agents to step through them, the simulation is compromised). The complexity of scales and relationships between the elements that belong to the Built Domain must be considered even when simulating at a fixed scale.

Even though this article does not detail how to couple city layer simulations in terms of communications, granularity, etc., it defines a conceptual framework that considers the complexity of the city through the interactions between its layers. The resulting Digital Twin is shown in Figure 9.

The article has discussed developing a digital twin using a theoretical framework that is modular by design. Every module being replaceable, the digital twin is extensible and transferable to other domains. In addition, the modularity allows the reuse of preexisting models, adapting them to each module, as well as the ability to improve the overall quality of the results by focusing on a single component and not worrying about others (as long as the interaction interfaces are kept fixed). Another benefit of modularity is that each layer or module can be worked on in parallel by specialized teams, who only need to agree on the communication protocols. This is what happened with the profiling of agents task (Section 2.3.2): in the beginning, a generic profile was used, and random arriving times; these were later improved with mobile phone and ticketing information (the spectator profiling of Section 2.3.1).

On a general level, the City Physiology framework allowed us to formalize and provide guidance on the development of the digital twin, and, in the opposite direction, the implementation provided us experience and feedback on what the framework means and how it works in practice. More specifically, it was found that the conceptual interpretation given by the framework permitted us to have a more fluid conversation between the experts in the different areas involved (architects, mobility researchers, data scientists, computer scientists, managers, and administrators); when in doubt, the blueprint of the system in a cross-domain language was the reference to adhere to.

On a lower level, focusing on the simulation itself, each phase produced its own results as already described in the “City Physiology in practice” section. Spectator profiles are obtained from the Society layer, in the form of demographic and origin of visitors, and attendance forecast. These feed into the simulation inputs to produce results that are interpreted in the Built Domain layer as different metrics for the chosen scenarios (arrival and evacuation), which are converted into maps to visually highlight the spatial patterns of the crowd and the stadium.

Future improvements of the system will focus on further exploiting the available WiFi logs and cameras (including some to be installed in stadium renovation) to improve and validate the agent-based simulation. In this sense, two possible lines of work will be pursued: to improve the profiling of visitors, Foursquare data will be merged with ticketing information and TripAdvisor data (or any other review corpus), as well as improving attendance prediction by including time components and further explanatory variables. On the simulation side, more complex crowd behavior and group dynamics will be added, including observed patterns like following locals to their assigned seats. A fourth improvement refers to the integration of the City Physiology framework into workflow management systems. This way, the proposed theoretical framework can be converted into a data pipeline where every layer corresponds to a task.

As for the validity of the theoretical framework, the digital twin should be tested by adding more city layers and conceptual layers to it, and their related technical layers.

In conclusion, choosing an interdomain language, such as the conceptual layers of City Physiology, allows us to uniformize the vocabulary used among the very different profiles involved in the urban sciences, be they planners, architects, policy makers, citizens, lawyers, computer scientists, and so on. Future work focusing on developing urban-focused digital twin products has a framework on which to base their design and to build a validation strategy with its end-users.

Data Availability

Previously reported Foursquare data were used to support this study and are available at https://sites.google.com/site/yangdingqi/home/foursquare-dataset. These prior studies (and datasets) are cited at relevant places within the text as references [22, 23]. The mobile phone data, sensor data, and space domain data used to support the findings of this study have not been made available because of privacy issues. Anonymized datasets can be requested from the Barcelona City Council by researchers who meet the criteria for access to confidential data.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This project has received funding from the European Union’s Horizon 2020 Research and Innovation Programme under the IoTwins Project (Grant agreement no. 857191). I. Meta was partially funded by the Agencia Estatal de Investigación-Ministerio de Ciencia Innovación (AEI-MICINN) and the European Social Fund (ESF) under the FPI program (scholarship no. PRE2019-090239).