# How Human Mobility Models Can Help to Deal with COVID-19
## 4 Generation of Scenarios
### Plaza Scenario  
This scenario is an open square located in the city centre of Valencia, Spain. Locally known as \"Plaza de la Virgen\", we will refer to it simply as Plaza. It is the typical tourist place that generally has a high degree of people renewal. The selected area has a dimension of \(120\times 120\) m (you can see an aerial view in Figure 1a). From this real scenario, we define in PedSim an area with obstacles and open spaces where pedestrians can enter or exit as shown in Figure 1b. The general process followed to generate the PedSim scenarios (the Plaza and Station scenarios) is the following: first, a text file (script) is created defining each the scenario. This script includes the main parameters, such as the speed of pedestrians, the points of interest through which they must pass, fixed obstacles, or walls. It is also necessary to define the time when every pedestrian enters or leaves the area. Second, this script is executed using PedSim in order to simulate the scenario. When the simulation ends, PedSim generates a trace file with the movement of all the pedestrians (time and location) with a resolution of 1 s.  
Regarding the Plaza scenario, the pedestrian's movement was generated considering that the plaza has an average number of 100 pedestrians, where 50 pedestrians are replaced every minute. The duration of the simulation is 1 hour, so the final number of pedestrians that have passed through the plaza is 3050 (that is, \(100+50\times 59\), the 100 initial pedestrians plus the 50 ones replaced every minute for the remaining 59 min.). Specifically, the renovation and movement of pedestrians were implemented as follows: the Plaza scenario has seven entry and exit accesses, and pedestrians are randomly placed at any of these entrances. The movement of pedestrians within the square follows the model of social force, as implemented by PedSim. These nodes are randomly assigned a displacement speed in the range of 0.3-1.5 m/s, moving between the main points of interest, delimited by the circles as shown in the Figure 1b. These points of interest are defined as the locations where pedestrians go and stay for a while, and which in this case represent monuments, restaurants, and terraces in the plaza. Regarding the renewal of pedestrians, in each re \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Scenario** & **Nodes** & **Area** & **Other parameters** \\ \hline RWP & 100 & \(100\) m \(\times 100\) m & minSpeed = 0.5 m/s, maxSpeed = 1.5 m/s, maxPause = 60.0 s \\ \hline SWIM & 100 & \(100\) m \(\times 100\) m & nodeRadius = 0.2 m, cellDistanceWeight = 0.5 m, nodeSpeedMultiplier = 1.5, waitingTimeExponent = 1.55, waitingTimeUpperBound = 50.0 s \\ \hline RWPa & 100 & \(100\) m \(\times 100\) m & minSpeed = 0.5 m/s, maxSpeed = 1.5 m/s, maxPause = 60.0 s, attractionPoints = \(\{25,25,1.5,10,10,75,75,1.2,10,10,60,30,1.3,10,10\}\) \\ \hline Plaza & 3050 & \(120\) m \(\times 120\) m & \(N_{0}=100\), \(A_{T}=60s\), \(P_{R}=50\) \\ \hline Station & 1485 & \(150\) m \(\times 50\) m & \(\beta_{D}=0.26\), \(\delta_{D}=0.15\), \(A_{T}=116\), \(P_{L}=30.27\), \(P_{A}=17.58\), \(N_{l}=939\), \(N_{O}=545\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main parameters of the generated models. neval interval, a given number of nodes are randomly selected among the pedestrians that are inside the square. These nodes are notified to leave the plaza using one of the existing exits, and then 50 new nodes are created and placed randomly at one of the entrances to the plaza and move across the stage. We also considered the social distancing into the mobility pattern generated by the PedSim simulator. One of the main recommendations for reducing the spread of the SARS-CoV-2 is keeping a safe space between oneself and other people. This increased physical distance has been considered in our model through the social force model used in the PedSim simulator. Particularly, in the simulator, two forces can be defined: the social force and the obstacle force.