Professional Documents
Culture Documents
Caspar A.S. Pouwa,b , Federico Toschia,c , Frank van Schadewijkb , Alessandro Corbettaa,∗
a Department of Applied Physics, Eindhoven University of Technology 5600 MB Eindhoven, The Netherlands
b ProRail Stations, 3511 EP Utrecht, The Netherlands
c CNR-IAC I-00185, Rome, Italy
Abstract
arXiv:2007.06962v1 [physics.soc-ph] 14 Jul 2020
Physical distancing, as a measure to contain the spreading of Covid-19, is defining a “new normal”. Unless belonging to a family,
pedestrians in shared spaces are asked to observe a minimal (country-dependent) pairwise distance. Coherently, managers of
public spaces may be tasked with the enforcement or monitoring of this constraint. As privacy-respectful real-time tracking of
pedestrian dynamics in public spaces is a growing reality, it is natural to leverage on these tools to analyze the adherence to physical
distancing and compare the effectiveness of crowd management measurements. Typical questions are: “in which conditions non-
family members infringed social distancing?”, “Are there repeated offenders?”, and “How are new crowd management measures
performing?”. Notably, dealing with large crowds, e.g. in train stations, gets rapidly computationally challenging.
In this work we have a two-fold aim: first, we propose an efficient and scalable analysis framework to process, offline or in real-
time, pedestrian tracking data via a sparse graph. The framework tackles efficiently all the questions mentioned above, representing
pedestrian-pedestrian interactions via vector-weighted graph connections. On this basis, we can disentangle distance offenders
and family members in a privacy-compliant way. Second, we present a thorough analysis of mutual distances and exposure-times
in a Dutch train platform, comparing pre-Covid and current data via physics observables as Radial Distribution Functions. The
versatility and simplicity of this approach, developed to analyze crowd management measures in public transport facilities, enable
to tackle issues beyond physical distancing, for instance the privacy-respectful detection of groups and the analysis of their motion
patterns.
Keywords: COVID-19 automated physical distancing analysis, high-statistics pedestrian dynamics, crowd management, statistical
mechanics of human crowds, privacy-respectful tracking
b. 2020-05-10
c. 2019-05-27
Figure 1: (a) Floorplan of platform 3 at Utrecht Central Station (NL). The area monitored by the sensors is highlighted in grey. (b) Sample of 75 passengers waiting
for a train to arrive on the 10th of May 2020, during the Covid-19 pandemic. Pedestrians which respect the 1.5 m physical distance regulations are colored in
green, people who are part of a family-group are colored in blue, distance offenders are colored in red. This classification is performed via the method proposed in
Section 5. In this situation only 3 out of the 75 people violate the physical distancing rules. (c) Same number of people distributed over the platform on the 27th of
May 2019, one year prior to the Covid-19 outbreak, here about one-third of the people stand closer than 1.5 m to someone else.
data [34], but also of social animals (e.g. [35, 36]). In [19, 37], tical observables of the pairwise distance (RDFs), before and
graphs have also been used to address big-data analyses and during the Covid-19 measures.
representation of pedestrian dynamics aiming at efficient data
searches.
4. Pedestrian radial distribution functions
3. Pedestrian tracking setup at Utrecht Central Station In theoretical physics and molecular dynamics, the radial
distribution function, g(r) (RDF), and the radial cumulative
We benchmark our approach considering pedestrian track- distribution function (RCDF), G(r), are established tools to
ing data acquired on platform 3 at Utrecht Central station, The characterize the distribution of pairwise distances between par-
Netherlands (cf. Figure 1). Utrecht Central, with roughly 57 ticles (see e.g. [38]), i.e., in our case, pedestrians.
million annual users, is the nation-wide busiest railway station. By definition of RCDF, for a crowd with uniform spatial
Since 2017, platform 3 has been equipped with 19 commercial density ρ, on average, i.e. in the mean-field of many realiza-
pedestrian tracking sensors, each of which captures 3D stereo tions, the number of people, Nρ (r), at a distance up to r from a
images at f = 10 frames per second and processes them to generic individual satisfies
deliver individual tracking data in a privacy-friendly manner Z r
(cf. sketch in Figure 1). The sensor view-cones are in partial Nρ (r) = ρG(r) = ρ g(z) dz, (1)
overlap, which enables the sensor network to stitch together 0
trajectory pieces acquired by the single devices. The total area
therefore, g(r) = ∂r G(r) holds. Thus, the functions g(r), G(r)
covered by the set of sensors consist of the full platform width
(and derived quantities) do not carry any space/time specific
(about 3 m) for 120 linear meters next to track 5, plus the area
information, rather they relate to average properties, depend-
underneath escalators and staircases connecting the platform
ing only on mutual distances.
to the central hall. This yields a covered area of approximately
For instance, in unconfined space, G(r) grows as the circle
450 m2 . Track 5 is among Utrecht’s busiest tracks and is pri-
area, i.e.
marily utilized by trains heading to Amsterdam Central Sta-
Nρuncon f (r) = πr2 ρ. (2)
tion and Schiphol Airport. The complex and multi-directional
crowd flows on the platform are recorded with high space- and In our train platform, such a ∼r2 growth ratio is possible only
time-resolution 24/7 since March 2017 (localization precision: when r is sufficiently smaller than the platform width. Else,
O(5−10) cm, similar technology to what employed in [25]). In we expect a ∼r1 (linear) trend, as the area growth is bound to
normal operation conditions, the system would capture about the platform length only. This holds until platform finite size
100.000 trajectories per day while, on average, only 16.000 effects come into play. In Figure 3 we compare the RDF and
trajectories per day were observed in the two months after the RCDF for the two density levels highlighted in Figure 2. We
Covid-19 outbreak (see pre- and during- Covid-19 crowd dis- notice a depletion in the radial distribution functions at short
tribution example in Figure 1 and crowd density histograms distances when comparing with the situation pre-outbreak. As
in Figure 2). This unique measurement setup gives us not only a partial anticipation of the results of this paper, in the figure
the possibility of developing and testing our approach in mean- we report also the RDF discounted of short-distance family-
ingful real-life conditions, but also to compare relevant statis- group interactions (such interactions are allowed by present
3
2000
2019-05-27
2020-05-27
1500
count(ρp)
1000
500
0
0 0.05 0.1 0.15 0.2 0.25 0.75 1.25
2
People density ρp [ped / m ]
Figure 2: Histogram of observed crowd density levels comparing a day before the Covid-19 outbreak (27th of May 2019, blue dots) and for a day during the
Covid-19 pandemic (27th of May 2020, red triangles). Prior to the Covid-19 outbreak, densities in excess of 1 ped/m2 occurred daily. One year later, during the
Covid-19 pandemic, the maximum crowd density recorded is only about 0.3 ped/m2 . We compare measurements acquired at similar density levels, i.e. where the
average available space per person is comparable. We focus on two density levels: 40-50 passengers (purple band, cf. Figures 3(a,c) and 6(a)) and 70-80 passengers
(green band, cf. Figures 1, 3(b,d) and 6(b)).
regulations). As expected, this yields a further depletion of the age, our identification of family-groups relies only on mutual
RDF in the region r / 1.5 m. In the figure, we additionally re- proximity and its time-consistency. Whenever two or more
port the aforementioned analytic trends and the R(C)DF func- pedestrians maintain a mutual short distance consistently through-
tions obtained through Monte Carlo numerical simulations in out a sufficient fraction of their trajectory, they should auto-
a rectangular domain with the same size as the platform. We matically emerge as belonging to the same family-group. Ad-
specifically consider an ensemble of simulated crowds of N ditionally, we deem implementation simplicity, while main-
pedestrians; individuals have a random spatial distribution sat- taining efficiency and sufficient accuracy in identifying family-
isfying a minimal mutual distance of 0.2 m. The figure reports groups relations, possibly in real-time, and without complex/costly
ensemble-averaged RDFs and RCDFs which thus include small- data-searches. Hence, our approach is “additive” (or “incre-
range quadratic growth, platform-width-bound linear growth mental”) and RDF-like information is increased, on the go, in
and finite size effect. Measurements well-conform with simu- a graph data structure (at minimal memory costs), and, with-
lations. out computationally-costly searches in stored records, family-
Short mutual distances over extended time duration are groups and offenders remain identified immediately. In other
known to increase the contagion probability: RDF and RCDF words, by additivity, we stress that our data structure is built
can be used to evaluate the average exposure time. A pedes- online and usable after only one time-forward pass of the tra-
trian that was on the platform for a time interval ∆T , was ex- jectory data.
posed, on average, for a time
5.1. Graph data structure construction
T rc = ∆T ρG(rc ), (3)
In conceptual terms, we represent the pedestrian trajecto-
with rc being a critical distance threshold (e.g. rc can be the ries as individual nodes of a graph H. Each node includes
nation-wide physical distancing requirement). Similarly, the information specific to the trajectories, such as overall obser-
function vation time, τ, source and destination. These three quantities
t(r) = ∆T ρg(r), (4) are incremental as, respectively, τ scales with the number of
frames a pedestrian is observed, the source point is the ini-
quantifies the contribution to the total average exposure time tial point of a trajectory while the destination gets constantly
given by peer pedestrians at distance r. updated with the current position until a pedestrian leaves the
measurement area. Whenever two pedestrians, say p1 and p2 ,
5. Distance-Interaction network are observed simultaneously (i.e. in the same frame) and their
Euclidean distance, r = d(p1 , p2 ), is below a critical thresh-
In this section, we describe our scalable framework to char- old D0 > D, we memorize (properties of) this event within the
acterize pedestrians pairwise distances, identify family-groups weight, w ~ (e), of the edge e = (p1 , p2 ), that connects the two
and distance offenders. pedestrian-nodes p1 , p2 . Specifically, the weight w ~ (e) aims at
Our measurements come in the form of time-stamped tra- a discrete counterpart of the RDF (g(r), cf. Eq. (1)) restricted
jectories. As no further information is available, such as body to pedestrians p1 , p2 and with support 0 ≤ r ≤ D0 . Similarly to
orientation or gaze direction [39] or body size/approximate the RDF, also the graph H does not hold detailed microscopic
4
2 2
10 10
~r
~r
101 101
100 100
log ρ G(r)
log ρ G(r)
~r2 ~r2
-1 -1
10 10
10-2 10-2
10-3 10-3
100 101 100 101
a. b.
log r [m] log r [m]
0.25 0.25
0.2 0.2
0.15 0.15
c • g(r)
c • g(r)
0.1 0.1
0.05 0.05
0 0
0 1 2 3 4 5 6 0 1 2 3 4 5 6
c. d.
r [m] r [m]
Figure 3: (a, b) Radial cumulative distribution functions (RCDF), g(r), and (c, d) radial distribution functions (RDF), G(r), for density levels on a typical working
day. On the left (a, c) for density level 1, with 40-50 pedestrians on the platform, (green domain in Figure 2) and on the right (b, d) for density level 2, with 70-80
pedestrians on the platform (purple domain in Figure 2). Vertical dashed lines at 1.5 m, 2.2 m and 2.5 m indicate, respectively, the Dutch social distancing regulations
(r < D), the usable width of the platform (without danger zone) and the critical threshold D0 . The solid black line at small r valuesR highlights the ∼r2 growth ratio
∞
up to 2.2 m and a blue line for the ∼r1 trend at larger mutual distances. In (b,d) the normalization constant c is chosen such that 0 cg(z) dz = N, where N is the
number of people on the platform. Similar plots for a weekend day are reported in Figure 6. We compare the pre-Covid situation with the present, and with a Monte
Carlo model of a random distribution of passengers across a region identical to the platform. We report the RDF and RCDF of the current situation including and
excluding family-groups contributions, as made possible by the method introduced in Section 5.
5
20 Dutch Outside danger zone
Contact
time [s]
regulations
Pedestrians
100
Inside danger zone
0 0
04:30 05:00 05:30 06:00 06:30 07:00 07:30 08:00 08:30
[0:0.5] m [0.5:1] m [1:1.5] m [1.5:2] m [2:2.5] m
a. b.
Figure 4: (a) Conceptual sketch representing the accumulation of information on the graph H. Whenever two pedestrians, say p1 , p2 stand at a distance d smaller
than D0 , this gets recorded in the histogram weight of the edge between nodes p1 and p2 as an additive contribution to the bin approximating d. In the sketch we
report a section of the platform: edge appear between nodes according to the distance; the histogram weights are reported atop and beneath the sketch with the same
color coding of the edges and scaled with the sampling time (thus they translate to the contact time conditioned by the distance). Nodes are reported in red if they
have performed at least one Corona event (thus they have an edge with non-zero contributions at distances below D0 ), else they are in green. (b) Examples of graphs
acquired in windows of about ten minutes around each train arrival (determining the peaks in the counts at the bottom). We report a magnified version of one among
these graphs. Nodes are colored by the node degree, i.e. by the number of first neighbors, ranging from yellow to red. Edge thickness scaled by the contact time,
T ed , Eq. (7). The higher the degree of a node, the larger the number of distance offenses performed by the associated pedestrian.
60
50
30
20
10
a. b.
Figure 5: (a) Detected clique consisting of two nodes representing two people traveling together. Both entering the platform through the stairs, waiting together for
the next train to arrive and finally boarding the train through the same door. The hue of the trajectories is proportional to the time spent on the platform. Lighter hue
when the people enter and a darker hue when they leave. Jump in hue indicating the place where the travelers were waiting. (b) Detected node with degree higher
than 10, i.e. a repeated offender who violates physical distancing with more than 10 other people. The trajectory of the repeated offender is reported in shades scaled
to the exposure time, while the trajectories of other people that were met violating physical distancing are in gray. The considered offender entered the platform via
the escalators and waited underneath the escalators for their train.
0.2 0.2
0.15 0.15
c • g(r)
c • g(r)
0.1 0.1
0.05 0.05
0 0
0 1 2 3 4 5 6 0 1 2 3 4 5 6
a. r [m]
b. r [m]
Figure 6: Radial distribution functions (RDF), g(r), for a typical weekend day in case of (a) 40-50 pedestrians on the platform, (green domain in Figure 2) and (b)
70-80 pedestrians on the platform (purple domain in Figure 2). The same conventions of Figure 2 hold. The presence of family-groups determine a peak in the
RDFs around r ≈ 0.5 m, which is much more pronounced than in the working day case. Discounting these contributions via the graph analysis notably restores a
∼r1 growth rate at small r values.
Data: Trajectories dataset, possibly live-streaming 5.2. Approximation of the short-range RDF as edge average
Result: Distance-interaction graph H The graph is a collection of RDFs functions restricted to
H = empty graph; pairs of pedestrians. As such, within the limits of the quantiza-
for t in time do tion, it is richer in information than the “global” RDF (Eq. (1)).
add any trajectory, pi , starting at time t as a node in The latter, in fact, can be recovered by averaging the edge
H, store origin; weights over the entire graph, i.e. by combining each pairwise
update persistence time τ pi , destination of all contribution. Restricting to a graph describing conditions with
observed trajectory-nodes pi ; equal density, the global RDF can be approximated as
for 0 < i < j ≤ # trajectories at time t do
if d(pi , p j ) < D0 then ~ d (e)
Z rd+1 w
~ (pi , p j )[q(d(pi , p j ))] += 1
w g(r) dr ≈ c P , ∀d, (6)
rd jw~ j (e) e
end
end where c is a constant scaling depending on the normalization
end considered for g. In words, the integral of the RDF in the bin
Algorithm 1: Graph construction algorithm in pseudo-code. [rd , rd+1 ] can be approximated by the d-th (enseble-averaged)
The data structure is built streaming the trajectory data once. edge weight. Averaging over a graph including non-homogeneous
The function q = q(d) returns the distance bin to which d density levels, yields the RDF averaged among such densities.
belongs. Hence, given the quantization in Eq. (5), it holds
q(0 < d < 0.5 m) = 0, q(0.5 m < d < 1.0 m) = 1, etc. 5.3. Interaction classification
In this subsection we leverage on the graph topology and
edge data to deduce relevant information about pairwise dis-
Extensions and variations. In settings as train platforms, not tance, family-group relations, exposure times, and physical
all the areas come with the same importance or criticality. The distance offenders.
7
10 200%
25 k 6 Contact time growing as the number of passengers
[0.0 : 0.5] m
Peds. Ndaily
20 k Actual growth relative to the passengers
4 [0.5 : 1.0] m
15 k
Avg. indiv. expos. time w/o families Tdp,f [s]
[1.0 : 1.5] m
10 k 2
8 [1.5 : 2.0] m
5k
0k 0 [2.0 : 2.5] m
17 19 21 23 25 0 0.5 1 1.5 2 2.5
150%
mutual distance [m]
6
γ • T / Ndaily
4
100%
0 50%
17 19 21 23 25 19 21 23 25
a. Week number b. Week number
Figure 7: (a) Average individual exposure time without family contributions (Eq. (9); weeks 17-26, working days only. Corona lockdown measures in The
Netherlands started around week 13). Each line reports average data from bins w ~ 0 (e), w
~ 1 (e), etc. The inset on the left shows the average daily passenger count,
Ndaily . The inset on the right reports the same individual exposure time data for week 21 in histogram form. A change in the train schedule on the 2nd of June (week
23, indicated with a vertical black dashed line) increased the train frequency by a factor γ ≈ 1.7 (Eq. 14). This improved the distribution of pedestrians over the
day thereby temporarily decreasing the individual exposure time. To make the data comparable over time and compensate for the train increment, we multiply the
exposure times by γ, Eq. (14) (dashed green line, bin w ~ 2 (e) only, i.e. r ∈ [1.0, 1.5] m ≈ D). We notice that the compensated exposure time grows steadily in time
gaining a factor 3.5×. This is a combined effect of the passenger growth and a reduction in attention and/or difficulty in adhering to physical distancing regulations.
In panel (b) we scale the exposure time by the number of passengers, i.e. we report γT p, d /N (d = 2). This ratio, which we further scale to its value at week 18,
f
displays a ≈100% growth between week 18 and 26, to confirm that the increment of passengers contributes only for 150% of the overall exposure time growth.
Pairwise exposure time and pairwise distance statistics. Pedes- that converge to p, in formulas
trians p1 and p2 , whose distance satisfied r = d(p1 , p2 ) ≤ D0 at X
least in one frame, have their interaction recorded on the graph T pd = d
T (p,p j)
, [Individ. expos. time] (9)
edge e = (p1 , p2 ). The weight w ~ (e) allows us to character- p j ∈N(p)
ize their distance properties restricted to the instants in which
r < D0 . In particular, the contact time T e between p1 and p2 where N(p) is the list of the first-neighbor of p (nodes con-
satisfies nected to p through at least a single edge). Equation (9) pro-
vides a counterpart to Eq. (3) in which we consider a specific
d
X pedestrian, p, rather than averaging over all pedestrians. No-
T ed = f −1 ~ j (e),
w [Contact time] (7) tice that the index d is the discrete analogue of the cutting
j=0 threshold rc .
where the index d selects the farthest relevant distance bin. Family-group relations. We determine whether two pedestri-
According to our quantization in Eq. (5), d = 2 would restrict ans, p1 , p2 , belong to the same family-group on the basis of
to interactions with r ≤ 1.5 m and thus quantify the “exposure d
their contact time T (p and their persistence time in the track-
1 ,p2 )
time” according to the Dutch regulations, whereas d = dmax = ing area, τ p1 and τ p2 . In particular, if the symmetric relation
4 includes all stored interactions for the pair e, i.e. r ≤ D0 . henceforth indicated as p1 ∼ p2 holds
Similarly, the average pairwise distance reads
p1 ∼ p2 ⇐⇒ [Fam-group condition]
~ j (e)
Pd
f −1 j=0 r j+ 12 w
hride = , [Avg. pairwise dist.] (8) (10)
T ed (1) (1) (2) (2)
T T T T
where r j+ 12 identifies the mid point between bin j and j + 1 min e , e > λ(1) and min e , e > λ(2) ,
τ p1 τ p2 τ p1 τ p2
in Eq. (5). Higher order moments of r weighted by w ~ (e) can
be used to estimate the fluctuation (variance) of the distance we consider p1 and p2 as belonging to the same family-group.
in time. In particular, if the variance σ2 (r) = hr2 ide − (hride )2 is We set λ(1) = 40%, λ(2) = 90% which, in words, translates
small, then the pedestrians kept an almost fixed distance during to people who have a pairwise distance of less than 1.5 m for
their trajectories. Notably, small or possibly zero r variance, 90% percent of the time and are within 1 m for 40% percent
σ2 (r), are necessary consition for non-positive (Finite Time) of the time. The rationale being that pedestrians who fol-
Lyapunov Exponent of the distance between p1 and p2 [40]. lowed the same trajectory, thereby being in mutual close prox-
imity for the major part of their persistence time, and who
Total individual exposure time. The total time an individual p are comfortable for extended periods in each other’s private
has been exposed to contacts can be computed by summing the space (r ≤ 1 m) most likely belong to the same family-group.
pairwise contact times T ed (Eq. (7)) for all pedestrians, p j , that Family-groups with more than two individuals are expected to
entered into contact with p, i.e. for all the edges e = (p, p j ) appear in the graph as completely connected sub-graphs, or
8
cliques, in which all the nodes are in Relation (10) between the aforementioned requirements can be constructed in addi-
each other. tive manner.
We can now define a second total individual exposure time
which is equal to T pd (Eq. (11)) after discounting family-group
6. Physical distancing at Utrecht Central Station,
contacts:
platform 3
X
f = .
d d
T p, T (p,p j)
[Individ. expos. time w/o families]
In this section we employ the graph H to analyze trajectory
p j ∈N(p)
p j p data collected in Utrecht station (see Section 3) and we com-
(11) pare statistics from before and during the Covid-19 pandemic.
Analogously, we can consider a RCDF discounted of family-
group contributions, say G f (r) (cf. Eqs. (1), (3)), such that Typical graphs and qualitative aspects. In Figure 4b, we re-
port examples of the graphs acquired during a typical morning
T rf c = ∆T ρG f (rc ) (12) (time interval 4AM - 8.30AM). Train arrivals are the most crit-
ical conditions when it comes to respecting physical distanc-
is the total exposure time with non-family individuals and up to ing, thus we create a new graph two minutes after each train
a spatial threshold rc . By differentiation (as in Eq. (1)), we can departure, when the platform is almost empty (this step is not
similarly define the RDF g f (r) discounted by family-groups. strictly necessary, but increases computational efficiency). In
the figure, nodes size and color follows the node degree, i.e.
Family sub-graph transitive closure. The relation “∼” can be the number of first neighbors and, thus, the distance offenses
non-transitive, i.e. p1 ∼p2 , p2 ∼p3 do not imply p1 ∼p3 . One committed by that node.
may thus consider the transitive closure of “∼”, say “∼¯ 00 which As a qualitative example of the capability of the method to
is defined as p1 and p3 belong to the same family-group (p1 ∼p¯ 3) extract relevant data, we showcase two antipodal conditions in
either if p1 ∼ p3 or if they have common family-group mem- Figure 5. In the first case (left panel), we report two pedestri-
bers. ans in a family-group relation that remain together throughout
In the data we analyze in Section 6, we do not consider their entire trajectories: from the escalators to the boarding. In
such transitive closure. In other words, family-group relations the second case, we have a repeated offender: the associated
are exclusively defined by Relation (10). On one hand, we node exhibits 28 first-neighbor connections. Interestingly, a
deem rare the event that a family remains not represented by a significant part of the offenses happens while the pedestrian
clique. Even in this case, we expect contributions to the overall waits in proximity of the escalator. This, therefore, rather
RDF statistics be minimal. On the other hand, in real-life data marks a waiting area to be disallowed, than a willing offender.
collected with sensors similar to ours, short/broken trajecto-
ries may appear. We observed that these, in combination with Family-group discounted RDFs. In Figures 3 and 6 we report
Relation (10) would unrealistically increase the probability of RDFs prior and after excluding family-group interactions. The
observing large family-groups. Hence, to avoid excessive and RDFs for r < D are non-vanishing, even after discounting the
unjustified complications in the heuristics we restrict to Rela- contributions of family-groups, most significant in the week-
tion (10). ends (when the presence of workers and commuters is lower;
cf. short-distance “bump” in Figure 6). We expect these re-
Relevant interactions, family-discounted graph and offenders. maining contributions at r < D to be to Corona events by dis-
Combining the previous elements we can now identify dis- tance offenders. Notably, once removed of family-groups con-
tance offenders as those pedestrians that violate physical dis- tributions, the RDFs at small r values recover a linear growth
tancing while not being part of a family. We consider the rate, as expected by a random spatial distribution of passengers
sub-graph H 0 ⊂ H obtained after pruning H of family-group (scaling as the derivative of Eq. (2)).
edges. The connections left in H 0 must indicate sporadic (i.e.
not time-consistent) distance infringements. Exposure time, node degree and evolution through the pan-
As exposure time is deemed a critical parameter for conta- demics. In Figure 7a we report, week-by-week, the average
gion [41], we apply a further time requirement to discriminate edge weight as introduced in Eq. (6), pruned of family-group
actual offenders. Specifically, we introduce the set P0α defined contributions and scaled by the sampling frequency. This pro-
as vides an approximation of how the (family-discounted) av-
P0α = {p ∈ H 0 : T p,
d
f > α}; (13) erage individual exposure time has been changing over time
in words, elements of P0α are pedestrians who violated phys- (weeks 17 to 26 in 2020). As the usage of the platform grew
ical distancing with non-family members for an overall time after a drop at the beginning of the outbreak, so did the ex-
longer than α. The number of first neighbors of a node in P0α posure time for distances between 0.5 m and 2.5 m, especially
identifies how many contacts such pedestrian had: we label as until week 22. On the opposite, the amount of time, per per-
repeated offenders those with more than 10 first neighbors (i.e. son, spent with a peer within 0.5 m has remained constant and
pedestrians that violated physical distancing with more than within fractions of a second. A new operation schedule at week
10 different people and for an overall time larger than α). We 23, with increased train frequency throughout the day, allowed
remark that this classification can be run in real-time as all
9
0 1 2:4 5:9 10: fit r = [0:1.5] m with A * xp where p = -2.28
r = [0.0 : 2.5] m
100 4
10 r = [0.0 : 2.0] m
r = [0.0 : 1.5] m
r = [0.0 : 1.0] m
80
103 r = [0.0 : 0.5] m
60
% of total
PDF
102
40
101
20
0 100
1 min 5 min 10 min
27
04
11
18
25
01
08
15
22
29
4-
5-
5-
5-
5-
6-
6-
6-
6-
6-
100 1000
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
d
20
20
20
20
20
20
20
20
20
20
Individual expos. time T p [s]
20
20
20
20
20
20
20
20
20
20
a. b.
Figure 8: (a) Distribution of node-pedestrian degree per day as a percentage of the total number of passengers. The degree of a node counts the number of people
encountered with a mutual distance smaller than 1.5 m (hence, degree 0 means that a person did not have any Corona event). We observe that high-degree nodes,
i.e. repeated distance offenders, increased steadily until the train schedule change (e.g. nodes with 10+ contacts grew from ≈1% to ≈10%). The schedule change
yielded a temporary drop in the offender percentage after which it started increasing again. This can be a sign of warning towards the relaxation in the compliance
d considering different maximum distances
of physical distancing rules. (b) Probability density function of the individual exposure time discounted of families, T p, f
(Eq. (9)). Exposure times show a power-law behavior. The PDF depletion after T = 5 minutes is most likely due to the time windowing that we operate around each
train arrival (cf. Figure 4b). This yields a data cut-off for large times.
a temporary reduction of the load on the platform, making eas- by the fact that we limit our graphs to time intervals of about
ier to respect physical distancing. From week 24 onward, in- 10-15 minutes around each train arrival. This reduces our res-
dividual exposure times showed again a growing trend. To olution at large time scales and thus yields the exponential-like
render the data comparable, we consider also exposure times drop in the distribution tails.
compensated for the new train schedule (Figure 7a, only for
the case r ≈ D) , i.e. corrected by a factor Crowd density: incidence of family-groups and effective of-
fenders. The passenger density on the platform has an influ-
# daily trains with new schedule ence on the offenses: the higher the density the easier it gets to
γ= ≈ 1.7. (14)
# daily trains with old schedule violate physical distancing. In Figure 9a we report for a sample
This shows a more stable growth pattern and an increase of day (12th of June 2020), how the percentage of “family” nodes
factor 3.5 between weeks 17 and 26 (the factor γ is an esti- and offenders scales with the density within the global density
mate, considering the presence of trains of different kind and interval [0, 0.5] ped/m2 . As in Eq. (13), we also include mini-
lengths). Scaling the corrected exposure times with the num- mum contact time thresholds, α, for tagging offenders. We ob-
ber of passengers, which is itself growing, we additionally no- serve that the percentage of nodes belonging to family-groups
tice, that the former is growing faster (i.e. exposure time grow remains stationary (value ≈11%, a detailed breakdown of the
super-linearly with respect to the passengers). This suggests a clique size is in Figure 9b). Up to 80% of the pedestrians at the
possible relaxation or an increased difficulty in following phys- maximum density level committed offenses assuming no min-
ical distancing regulations. imum time threshold (α = 0). This percentage slightly dimin-
We report in Figure 8a an in-depth breakdown of the dis- ishes to 60% restricting to a minimum contact time α = 5 s.
tribution of node degrees, i.e. the number of first neighbors of Interestingly, the percentage shows a non-linear dependency
each node and thus the number of contacts with different indi- on the density when α = 30 s. In particular, such percentage
viduals the node had (including both offenses and families). remains stationary (value ≈ 11%) until 0.2 ped/m2 and then
Consistently with our previous observations, the fraction of suddenly increases. This can suggest an increase in difficulty
high degree nodes (5+ or 10+), i.e. repeated offenders, has also in following distancing rules around this density level. We re-
been growing steadily, but a temporary drop following the train port the coefficients of the linear fitting of such data in Table 1.
schedule change. In Figure 8b we display the distribution of in-
dividual exposure times pruned of family contributions, and up 7. Discussion
d
to the distance thresholds rd (Eq. (5)), i.e. the pdfs of T p, f (cf.
Eq. (11)). Similarly to what discussed in [42], and consistently We have presented an highly efficient and accurate approach
with the model in [43], we observe a power-law distribution in to the problem of studying, in real-time, the distance-time en-
the exposure times (exponent p < −2), which emerges as a ro- counter patterns in a crowd of individuals. Our approach al-
bust feature of random encounter dynamics. Additionally, we lows us to identify social groups, such as families, by imposing
notice that the distance threshold plays a strong multiplicative thresholds on the distance-time contact patterns. In the context
effect and, possibly, it also weakly influences the exponent. It of the currently ongoing Covid-19 pandemic, we demonstrate
is worth remarking that our largest observation times are bound this as an effective and promising tool to monitor, in a full
10
100
Nodes with any contact
Indiv. nodes exposed
Indiv. nodes with exposure > 10s
Indiv. nodes with exposure > 30s Solo’s Duo’s Trio’s Groups
80 Nodes part of family-group
100
Node percentage [%]
95
60
90
85
% of total
40 80
75
20 70
65
60
0
9
2
2
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
4-
5-
5-
5-
5-
6-
6-
6-
6-
6-
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
Density [p/m2]
20
20
20
20
20
20
20
20
20
20
20
20
20
20
20
20
20
20
20
20
a. b.
Figure 9: (a) Percentage of pedestrian nodes exposed to contacts as a function of the global density on the platform (density calculated as number of people in a
frame divided by the total sensor area, 450 m2 , discounted of the danger zone, 96 m2 ). Exposed nodes that have at least one contact, of any duration, with another
pedestrian (within or outside their family-group or not) are in blue. This percentage if further broken down into nodes part of a family group (red) and actual distance
offenders (green). The purple and orange lines restrict, respectively, to nodes with a minimum exposure time of 10 s and 30 s. Linear fitting parameters are reported
in Table 1. (b) Distribution of individuals and cliques day-by-day as a percentage of the total number of nodes. Between 80% and 85% of the nodes do not belong
to cliques, i.e. they travel alone and their contacts are all distance infringements. Family-groups of two people cover about 12% − 15% of the remaining nodes;
family-groups of three and more provide a minimal ≈3% contribution.
Table 1: Linear fit parameters for the node classification (percentage data) in study the collective dynamics of large groups of active or pas-
Figure 9a. As a measurement unit for the pedestrian density we employ tenths
of pedestrians per square meter: δ = 10−1 ped/m2 . Thus the fitting intercept sive particles making it a tool capable of going well beyond
is at δ = 0 while the increments (slopes) are reported as percent variations per the application to crowd dynamics and physical distancing dis-
δ unit. As an example, pedestrians that do not belong to a family-group and cussed here.
are in contact with someone else grow about 13% when the density increases
between 0.2 and 0.3 ped/m2 and similarly between 0.3 and 0.4 and so on. We
do not report linear fitting parameters for the case α = 30 s as the growth is References
non-linear.
[1] World Health Organization, COVID-19: physical distancing, Tech. rep.
δ≈0 Slope (2020).
URL https://www.who.int/westernpacific/emergencies/
Ped.-nodes with any contact 28.5 % 13.4 %/δ covid-19/information/physical-distancing
Ped.-nodes exposed 17.1 % 12.9 %/δ [2] H. Tian, Y. Liu, Y. Li, C.-H. Wu, B. Chen, M. U. G. Kraemer, B. Li,
Ped.-nodes with exposure α > 10 s 9.56 % 12.4 %/δ J. Cai, B. Xu, Q. Yang, B. Wang, P. Yang, Y. Cui, Y. Song, P. Zheng,
Q. Wang, O. N. Bjornstad, R. Yang, B. T. Grenfell, O. G. Pybus, C. Dye,
Ped.-nodes part of a family-group 11.5 % 0.48 %/δ An investigation of transmission control measures during the first 50
days of the COVID-19 epidemic in China, Science 368 (6491) (2020)
638. doi:10.1126/science.abb6105.
privacy respectful way, the observation of physical distancing. [3] B. Rader, S. Scarpino, A. Nande, A. Hill, R. Reiner, D. Pigott, B. Gutier-
The outcome of the analysis can provide early warnings in re- rez, M. Shrestha, J. Brownstein, M. Castro, H. Tian, O. Pybus, M. Krae-
mer, Crowding and the epidemic intensity of COVID-19 transmission,
spect to an average relaxation towards the compliance of phys- medRxivdoi:10.1101/2020.04.15.20064980.
ical distance rules, can allow to identify spots where physical [4] R. M. Anderson, H. Heesterbeek, D. Klinkenberg, T. D. Hollingsworth,
distancing most frequently is violated and it may, as well, al- How will country-based mitigation measures influence the course of
low to identify in real-time the presence of distance offenders. the covid-19 epidemic?, Lancet 395 (10228) (2020) 931–934. doi:
10.1016/S0140-6736(20)30567-5.
We observed, besides, a super-linear dependence between con- [5] M. Chinazzi, J. Davis, M. Ajelli, C. Gioannini, M. Litvinova, S. Merler,
tact times and passenger number. This can be caused both by a A. Pastore y Piontti, K. Mu, L. Rossi, K. Sun, et al., The effect of travel
reduction of attention towards social distancing rules but also restrictions on the spread of the 2019 novel coronavirus (covid-19) out-
to an intrinsic increase in difficulty in complying to regula- break, Science 368 (6489) (2020) 395–400. doi:10.1126/science.
aba9757.
tions. The investigation of this aspect is left to future research. [6] Sensormatic, Privacy-Preserving Contact Tracing, Tech. rep. (2020).
The proposed algorithm is simple and can be easily imple- URL https://www.apple.com/covid19/contacttracing
mented using existent graph code libraries. In our case, we [7] E. Cristiani, B. Piccoli, A. Tosin, Multiscale Modeling of Pedestrian Dy-
namics, Vol. 12 of Modeling, Simulation and Applications, Springer,
could process a day of data in few minutes using the python
2014.
NetworkX library [44]. Libraries sporting higher performance [8] D. Helbing, Traffic and related self-driven many-particle systems, Rev.
and/or scalability exist in case of even more demanding situa- Mod. Phys. 73 (4) (2001) 1067. doi:10.1103/RevModPhys.73.
tions. 1067.
[9] J. Adrian, M. Amos, M. Baratchi, M. Beermann, N. Bode, M. Boltes,
It is worth mentioning that the approach here proposed can A. Corbetta, G. Dezecache, J. Drury, Z. Fu, et al., A glossary for research
be applied to any type of tracing trajectories and possibly to on human crowd dynamics, Collective Dynamics 4 (A19) (2019) 1–13.
doi:10.17815/CD.2019.19.
11
[10] M. Moussaı̈d, N. Perozo, S. Garnier, D. Helbing, G. Theraulaz, The ral databases, Springer, 2005, pp. 364–381. doi:10.1007/11535331_
walking behaviour of pedestrian social groups and its impact on crowd 21.
dynamics, PloS one 5 (4) (2010) e10047. doi:10.1371/journal. [32] J. A. Bondy, U. S. R. Murty, et al., Graph theory with applications, Vol.
pone.0010047. 290, Macmillan London, 1976.
[11] F. Zanlungo, T. Ikeda, T. Kanda, Potential for the dynamics of pedes- [33] I. Pitas, Graph-based social media analysis, Vol. 39, CRC Press, 2016.
trians in a socially interacting group, Phys. Rev. E 89 (2014) 012811. [34] D. Guo, S. Liu, H. Jin, A graph-based approach to vehicle trajectory
doi:10.1103/PhysRevE.89.012811. analysis, J. Locat. Based Serv. 4 (3-4) (2010) 183–199. doi:10.1080/
[12] A. Gorrini, G. Vizzari, S. Bandini, Age and group-driven pedestrian 17489725.2010.537449.
behaviour: from observations to simulations, Collective Dynamics 1 [35] M. J. Silk, D. N. Fisher, Understanding animal social structure: expo-
(2016) 1–16. doi:10.17815/CD.2016.3. nential random graph models in animal behaviour research, Anim. Be-
[13] G. Kster, M. Seitz, F. Treml, D. Hartmann, W. Klein, On modelling the hav. 132 (2017) 137–146. doi:j.anbehav.2017.08.005.
influence of group formations in a crowd, Contemporary Social Science [36] H. Ohtsuki, C. Hauert, E. Lieberman, M. A. Nowak, A simple rule
6 (3) (2011) 397–414. doi:10.1080/21582041.2011.619867. for the evolution of cooperation on graphs and social networks, Nature
[14] F. Zanlungo, Z. Yücel, T. Kanda, Social group behaviour of triads. de- 441 (7092) (2006) 502–505. doi:10.1038/nature04605.
pendence on purpose and gender, Collective Dynamics 5 (2020) 118– [37] A. Corbetta, C. Lee, A. Muntean, F. Toschi, Frame vs. Trajectory Anal-
125. yses of Pedestrian Dynamics Asymmetries in a Staircase Landing, Col-
[15] A. Templeton, J. Drury, A. Philippides, From mindless masses to small lective Dynamics 1 (A10) (2017) A10. doi:10.17815/CD.2017.10.
groups: conceptualizing collective behavior in crowd modeling, Review [38] J.-P. Hansen, I. R. McDonald, Theory of simple liquids, Elsevier, 1990.
of General Psychology 19 (3) (2015) 215–229. [39] A. C. Gallup, J. J. Hale, D. J. Sumpter, S. Garnier, A. Kacelnik, J. R.
[16] D. Brščić, F. Zanlungo, T. Kanda, Density and velocity patterns dur- Krebs, I. D. Couzin, Visual attention and the acquisition of information
ing one year of pedestrian tracking, Transportation Research Procedia 2 in human crowds, Proc. Natl. Acad. Sci. U.S.A. 109 (19) (2012) 7245–
(2014) 77 – 86. doi:10.1016/j.trpro.2014.09.011. 7250. doi:10.1073/pnas.1116141109.
[17] A. Corbetta, L. Bruno, A. Muntean, F. Toschi, High Statistics Mea- [40] J. C. Vallejo, M. A. Sanjuan, M. A. Sanjuán, Predictability of chaotic
surements of Pedestrian Dynamics, Transportation Research Procedia dynamics, Springer, 2017.
2 (2014) 96–104. doi:10.1016/j.trpro.2014.09.013. [41] World Health Organization, Coronavirus disease (COVID-19) advice
[18] A. Corbetta, J. Meeusen, C. Lee, F. Toschi, Continuous measurements of for the public, Tech. rep. (2020).
real-life bidirectional pedestrian flows on a wide walkway, in: Pedestrian URL https://www.who.int/emergencies/diseases/
and Evacuation Dynamics 2016, University of Science and Technology novel-coronavirus-2019/advice-for-public
of China press, 2016, pp. 18–24. [42] C. Cattuto, W. Van den Broeck, A. Barrat, V. Colizza, J.-F. Pinton,
[19] A. Corbetta, J. A. Meeusen, C. Lee, R. Benzi, F. Toschi, Physics-based A. Vespignani, Dynamics of person-to-person interactions from dis-
modeling and data representation of pairwise interactions among pedes- tributed rfid sensor networks, PloS one 5 (7) (2010) e11596. doi:
trians, Phys. Rev. E 98 (6). doi:10.1103/PhysRevE.98.062310. 10.1371/journal.pone.0011596.
[20] A. Corbetta, C. Lee, R. Benzi, A. Muntean, F. Toschi, Fluctuations [43] T. Karagiannis, J.-Y. Le Boudec, M. Vojnović, Power law and exponen-
around mean walking behaviours in diluted pedestrian flows, Phys. Rev. tial decay of intercontact times between mobile devices, IEEE T. Mobile
E 95 (2017) 032316. doi:10.1103/PhysRevE.95.032316. Comput. 9 (10) (2010) 1377–1390. doi:10.1109/TMC.2010.99.
[21] M. C. Marchetti, J. F. Joanny, S. Ramaswamy, T. B. Liverpool, J. Prost, [44] D. A. S. Aric A. Hagberg, P. J. Swart, Exploring network structure, dy-
M. Rao, R. A. Simha, Hydrodynamics of soft active matter, Rev. Mod. namics, and function using networkx, in: Proceedings of the 7th Python
Phys. 85 (2013) 1143–1189. doi:10.1103/RevModPhys.85.1143. in Science Conference (SciPy2008), Gel Varoquaux, Travis Vaught, and
[22] D. Brščić, T. Kanda, T. Ikeda, T. Miyashita, Person tracking in large Jarrod Millman (Eds), 2008, p. 1115.
public spaces using 3-d range sensors, IEEE Trans. Human-Mach. Syst.
43 (6) (2013) 522–534. doi:10.1109/THMS.2013.2283945.
[23] S. Seer, N. Brändle, C. Ratti, Kinects and human kinetics: A new ap-
proach for studying pedestrian behavior, Transport. Res. C-Emer. 48
(2014) 212–228. doi:10.1016/j.trc.2014.08.012.
[24] W. Kroneman, A. Corbetta, F. Toschi, Accurate pedestrian localization
in overhead depth images via height-augmented hog, Collective Dynam-
ics 5 (2020) 33–40. doi:10.17815/CD.2020.30.
[25] J. van den Heuvel, J. Thurau, M. Mendelin, R. Schakenbos, M. Ofwe-
gen, S. Hoogendoorn, An application of new pedestrian tracking sensors
for evaluating platform safety risks at swiss and dutch train stations, in:
Hamdar S. (eds) Traffic and Granular Flow ’17. TGF 2017, Springer,
2019, pp. 277–286. doi:10.1007/978-3-030-11440-4_31.
[26] F. Giannotti, M. Nanni, F. Pinelli, D. Pedreschi, Trajectory pattern min-
ing, in: Proceedings of the 13th ACM SIGKDD international confer-
ence on Knowledge discovery and data mining, 2007, pp. 330–339.
doi:10.1145/1281192.1281230.
[27] Y. Zheng, Trajectory data mining: an overview, ACM Transactions on
Intelligent Systems and Technology (TIST) 6 (3) (2015) 1–41. doi:
10.1145/2743025.
[28] F. Zanlungo, D. Brščić, T. Kanda, Pedestrian group behaviour analysis
under different density conditions, Transportation Research Procedia 2
(2014) 149–158. doi:10.1016/j.trpro.2014.09.020.
[29] M. Benkert, J. Gudmundsson, F. Hübner, T. Wolle, Reporting flock pat-
terns, Comput. Geom. 41 (3) (2008) 111–125. doi:j.comgeo.2007.
10.003.
[30] M. R. Vieira, P. Bakalov, V. J. Tsotras, On-line discovery of flock pat-
terns in spatio-temporal data, in: Proceedings of the 17th ACM SIGSPA-
TIAL international conference on advances in geographic information
systems, 2009, pp. 286–295. doi:10.1145/1653771.1653812.
[31] P. Kalnis, N. Mamoulis, S. Bakiras, On discovering moving clusters in
spatio-temporal data, in: International symposium on spatial and tempo-
12