Active and reactive behaviour in human mobility: the influence of attraction points on pedestrians

Human mobility is becoming an accessible field of study, thanks to the progress and availability of tracking technologies as a common feature of smart phones. We describe an example of a scalable experiment exploiting these circumstances at a public, outdoor fair in Barcelona (Spain). Participants were tracked while wandering through an open space with activity stands attracting their attention. We develop a general modelling framework based on Langevin dynamics, which allows us to test the influence of two distinct types of ingredients on mobility: reactive or context-dependent factors, modelled by means of a force field generated by attraction points in a given spatial configuration and active or inherent factors, modelled from intrinsic movement patterns of the subjects. The additive and constructive framework model accounts for some observed features. Starting with the simplest model (purely random walkers) as a reference, we progressively introduce different ingredients such as persistence, memory and perceptual landscape, aiming to untangle active and reactive contributions and quantify their respective relevance. The proposed approach may help in anticipating the spatial distribution of citizens in alternative scenarios and in improving the design of public events based on a facts-based approach.

The development of information and communications technologies (ICT) is changing the way we interact with the world, and by extension the way we perform science.We have entered the big data era 1 which, in principle, puts in the hands of researchers enormous possibilities to monitor, study and understand human activities.Among such technologies, the development of readily available, cheap and reliable geo-localized devices has fostered the field of studies in human mobility.Computer vision analysis, 2 Bluetooth devices, 3,4 RFID signal intensity, 5,6 mobile phone calls [7][8][9] and geo-localized social network feeds 10 represent just a handful of the methods and data sources that have now been successfully exploited for this purpose.
Despite the recent technological advances, two important challenges remain for the scientific community: accessibility and data biases.On one hand, data openly available for human mobility research is scarce and somewhat restricted.ICT companies are reluctant to freely share their data with the scientific community, and when they do so it is often with strict constraints that pose challenges for the reproducibility of experiments.On the other hand, human mobility data gathered directly from traditional research volunteers is often limited by privacy considerations and scalability.In the present paper we propose that the emerging citizen science research model [11][12][13] offers an alternative strategy that can solve the problems of data quality, control, property rights, accessibility, and privacy, offering reproducible results.We use this strategy to investigate human mobility at an outdoor science fair in Barcelona (Spain).By gathering location information in a crowded public space and making volunteers active participants in the scientific process, we are able to easily construct a unique high-resolution and open-access data set.
In the context of human mobility, cell phone GPS receivers offer a good technological option for gathering location information, 14 one that also bridges the field of human movement in open spaces with that of behavioural ecology, 7,15,16 with its rich and consistent literature on home-ranging and foraging.Although the resolution of GPS-based location estimates often drops in urban areas (e.g., due to building shadowing) GPS nonetheless offers the ability to track individuals at mid-range spatial scales (e.g.hundreds of meters to several kilometers) and may be augmented by location information from cellular networks, wifi routers and other sources.Moreover, knowledge extracted even at mid-range scales can be critical to understanding and improving the quality of life in cities, as it closely manifests the relationship between people and the urban environment.
8][19] Depending on the state of the organism (e.g. level of hunger, stress) and the amount and quality of the available information, movement is tightly capitalized by sensory or memory information (reactive motion) or else by a more explorative inherent component (active motion).Importantly, exploratory movement may also be guided by sensors and cognitive processing (past experiences), but the motor connections between cause and effect should be considered less explicit and time-delayed.8][19] One may also connect the binary reactive/active distinction to the classic debate in movement ecology on whether external or internal factors govern movement. 20In any case, the distinction between reactive and active motion should be taken cautiously and in relative terms, with active motion viewed as involving more free movement actions than reactive motion, but not being the exclusive domain of such actions.
Here we model and characterize human movement at the Barcelona science fair in terms of active and reactive components.In our experiment, participants were invited to wander around an open space containing the fair's activity stands while tracking themselves using a mobile phone application.Individuals could freely move around and access any of the stands.The space in which they moved was not isotropic-it included obstacles, paths trails, and forbidden walking areas-but the stands were set up to clearly attract most of the attention and drive movement dynamics in this ludic, open-air event.
We propose an additive framework model to characterize participants' motion, using a complex systems science approach to account for some of the observed features.Starting with the most simple model (purely random walkers) as a reference, we progressively introduce different ingredients such as persistence, memory, and perceptual landscape, aiming to untangle active and reactive contributions and quantify their respective relevance.We then compare the limitations and strengths of the proposed models, and discuss the delicate balance between complexity and accuracy when modeling human movement.The framework we propose is flexible enough and sufficiently easy to handle to be used as a tool to better understand mobility in other contexts.

Results
The experiment, the data and some basic definitions We carried out the experiment, called Bee-Path (BP), at Barcelona's annual science festival, a major event held in an public park and promoted by the city council (see Methods for further details).During two consecutive days, participants were tracked as they wandered around the park to visit fair stands that offered a variety of activities.While the participants had access to some information about the activities held in the stands (and possibly some prior knowledge about the environment), they were recruited upon entering the space, as shown in Fig. 1, and hence are assumed to have had no previous direct experience in exploring the fair.
After removing outliers from the data (see Supplementary Information, SI), we ended up with 4,994 GPS locations, corresponding to 27 participants and roughly 27 hours of experiment.The timestamped GPS locations for each subject were converted into stop-and-run individual walks using a two-step procedure (see Methods and Fig. 1): First, locations were flagged as either moving or stopped.Second, successive locations flagged as stopped were used to determine stop time lengths, and the successive locations flagged as moving were grouped into flights using the so-called rectangular grid criteria 21 (see Fig. 1 for further details).Each stop has a time duration ∆t s and a location x s defined as the average position of its stopped points.Conversely, each flight has a time duration ∆t f and a length ∆r f defined as Euclidean distance between starting and ending points.These two magnitudes also allow us to obtain an average velocity for each flight v = ∆r f /∆t f .Each participant has a track defined by these flights and stops, and each track has an associated mean velocity, calculated as the average of its flight velocities.There are a total of 350 flights and 300 stops.
Although the participants vary in demographic characteristics, we find no particular profile in terms of age or gender (see discussion in SI) and we assume population homogeneity, pooling all data to improve statistical discernment between stopping and moving states, better detect main orientation features, and minimize the effect of location errors caused by GPS noise.Also crucial is the assumption that the stop-and-run tracks obtained adequately characterize key aspects of the actual movement, which may be intrinsically assumed to be a continuous process in space and time.The most we can do is to consider and evaluate potential biases in the conversion from discrete GPS locations to stop-and-run walks by exploring how parameter choices in the movement processing algorithm affect results (see SI where also the biases on an isotropic Random Walk are analytically evaluated).
Considering these preliminaries, we analyse movement features from a two-fold perspective.We first assess participants' overall space use by computing the population-level utilitisation distribution.Second, we take the stop-and-run walks approach to compute movement metrics that help us to understand key features of movement as well as to evaluate how the empirical data fits into different classes of proposed models.

Movement patterns
We compute the population-level utilisation distribution in two-dimensional space using a dynamic Brownian Bridge Movement Model (dBBMM), [22][23][24][25] which assumes observed locations are bridged by Brownian motion, with the diffusion coefficient adjusted for each bridge based on observed variance in the trajectory.We apply this model to all tracks to calculate, for each cell in discretized observation space, the relative frequency of participants' presence during the experiment (see Methods for further details).Top left Fig. 2 shows that participants were mainly concentrated around the stands, albeit with this concentration seeming to decrease as we move further away from the starting point of the experiment.Therefore, the specific configuration of the stands, placed along the x-axis, has a strong effect on the mobility of the participants.The space shows the non-isotropic character of urban areas and spaces, which in many cases is purposeful (stand distribution and accessibility were deeply discussed by the fair's organizing team).The polar plots in top right Fig. 2 further confirm this finding: The flight orientation is biased in the direction of the promenade -the x-axis-where the concentration of stands is high, while the asymmetry between the positive, 0 o , and negative direction, 180 o , in the x-axis reveals the general tendency of the people to form a flow from the entrance of the park, at the left of the map, to the last stand of the fair, at the right.
The empirical stopping time statistics can be observed in bottom left Fig. 2. The observed stopping time Complementary Distribution Function (CDF) can thus be well fitted by a weighted double exponential law with two different characteristic decaying times, The shortest characteristic decay time is around 30 seconds and corresponds to reorientation processes.As shown in Fig. 3, the shortest stops (smaller circumferences) appear to be randomly distributed over the fair space, indicating that this timescale may be related to orientational process not directly driven by the fair stands (reactive behaviour) but linked instead to other factors.In contrast, Fig. 3 also shows that the longest stops are much closer to fair stands (spots in yellow) where activities are happening.The characteristic scale of these flights is around 10 minutes (largest characteristic scale in the CDF of Eq. ( 1)).
The stop lengths are much smaller than the time span of the activities held in the stands, suggesting limited attention capacity 26 by the fair participants.The fair included science outreach activities, such as talks and hands-on workshops, with durations generally between 30 minutes and 1 hour or in some cases even longer.Some stands hosted activities with no specific duration, lasting an entire morning or afternoon, or even the whole day.Based on the divergence between the time length of the stops at the stands and the length of the activities prepared for the fair, we have advised the organisers to aim for shorter, fresher and more dynamic activities to better capture audience attention in future editions of the fair.Figure 2 also shows that the flight length CDF displays a single exponential decay We note that the distribution has a natural lower bound when r = R stop forced by the rectangular grid criteria for the flights algorithm described in the bottom panel of Fig. 1.Due to the relatively small park dimensions and moderate densities, one could neither expect very large displacements nor identify heavy-tailed flight behaviour. 7Results show however a relatively slow decay compared to the overall scale of the fair space (330 × 145 meters), with a characteristic length of λ = 27m.This scale is large enough to consider the presence of such long flights as unexpected, given the moderate densities (non-crowded) and the small and bounded environment in which fair activities were taking place.Our experimental data shows that some participants skipped stands, sometimes making larger flights more probable, and exhibiting the type of short-range directional persistence commonly found in animal movement. 27An extended discussion is provided in the SI.A final feature worth studying is the distribution of flight velocities.This is highly peaked around 0.6 ± 0.3m/s which is below standard human velocity speed (see SI).The small average flight velocity detected is probably the result of a moderate density of attendants to the fair in combination with the multiple activities available to visitors.Moreover, such a reduced variance in flight velocity also suggests low individual variability and the presence of an homogeneously behaved population.We computed velocity distributions discarding the stops, only using the moves or flight segments.

The Bee-Path attractivity model framework
Pollinators, such as bees, move across the landscape looking for resources (within flowers) by following a stop-and-run process. 17,27 he resulting stop-and-run paths emerge as a combination of reactive (extrinsic) and active (intrinsic) individual behaviour.Similarly, the human movement observed at the fair can be modelled as a stop-and-run process driven by two main components: external inputs and intrinsic motion.Individuals largely wandered through the fair according to their instincts or some vague expectations (context independent decisions) but, from time to time, they could feel the attraction of specific stands hosting specific activities.We develop here minimal models of increasing complexity (BP model framework) that may help us to distinguish external from internal drivers of motion, and define the key features of the movement observed within the fair.

3/12
To describe the position r(t) of an individual at time t, we use a two-dimensional stochastic model based on Langevin Dynamics, 30 which describe the trajectory of a particle moving randomly due to a thermal bath (internal energy) and subject to a field of forces (external energy).We assume individuals have no inertia: Although humans clearly have memory of past events, our assumption here is that their orientation decisions during the fair are mostly taken with respect to actual circumstances. 28he dynamical equation for the BP model framework, discretized in intervals of ∆t and in the Itô sense 30 then reads, where the first term stands for the potential landscape capturing the field of forces (reactive component, F R ) while the second refers to the random fluctuations on the movement (active component, F A ).The potential landscape V (r) is generated by the joint effect of fourteen different sources of identical shape, which are located in the same positions as the stands in the experimental setup (see Fig. 1).
We have thus dynamics governed by two contributions, the reactive one, which depends on the attraction form of the external inputs and the active one, whose intensity is controlled by the parameters β (random unit radial contribution) and κ (random angular contribution) which simulate the inherent movement stochasticity. 28Drag parameter γ is manually set to unity following the assumption that all individuals are equally susceptible to the action of both the reactive and active forces (a change of this parameter would only redefine the timescale of the process).Concerning the form of the potential for the attraction wells, a single stand centred at r 0 is represented as a gravitational-like attractive potential well generated by a non punctual spherical attractive mass 30 The two constants of the potential are fixed in terms of the radius of the non-punctual spherical region σ (related to the size of the stands) and in terms of the intensity of the potential outside this circular region V 0 (related to the attraction force).Intensity solely depends on the Euclidean distance |r − r 0 |.We therefore construct a set of attractive wells located at each of the stands of the fair as shown in Fig. 3.For simplicity, both σ and V 0 are taken as equal for all stands, with the intensity of the stands V 0 adjusted from real data, and σ = 4m chosen according to the actual physical area of the original stands.
We consider an individual to be trapped by an attractor when she approaches a given stand for the first time and comes within a distance shorter than σ ; the other potentials then deactivate, representing that her attention is fully focussed on the activity of that stand.Under this scenario, we observe that the stopping locations of the motion dynamics can be described by the classic Kramers problem 31 extended to two dimensions, which evaluates the statistics of the trapping times.The classic exponential decay distribution of the Kramers problem is consistent with empirical stopping time distribution (longest stops) as shown in Fig. 2. The ratio of parameters V 0 and β determines the decaying ratio in the distribution of stops (see SI for a complete exploration of the parameters space).To incorporate memory effects in our modelling approach, we consider that after an individual has visited one of the attractive wells (a stand) and leaves it (being further than distance σ ), the subject ceases to feel its attraction and henceforth the attractive well is deactivated for this walker.
Therefore, the motion in our experiment is described by Eq. ( 3) with the potential V (r(t)) taking the explicit forms in Eq. ( 4) depending on the position of the subjects.They will be most of the time in a moving state described by the first expression corresponding to |r − r 0 | ≥ σ .Occasionally subjects are trapped inside a potential well described by the second expression.Therefore, dynamics are analogous to the Kramers problem 31 and our processing algorithm labels them in a stopping state.We thus see how this description bridges stop-and-run process from behavioural ecology to the continuous in time BP model framework.

Shaping the active and the reactive passive components.
The BP model framework proposed in Eq. ( 3) is highly flexible and makes it possible to clearly identify the basic ingredients of movement in the fair, recovering some of the empirical features of the experimental data.The used model contains a maximum of four free parameters (κ, β , V 0 , and σ ) although σ is defined by the geometry of the attraction wells.We thus fix σ = 4 m.
We can disentangle different aspects by playing with free parameters of the BP model framework and then simulate the subsequent four possible types of dynamics.Firstly, we can consider a pure random walk (RW) without attraction wells so that individuals have only an active component (V 0 = 0, κ = 0 and β remaining as the only free parameter).Secondly, we can test another purely active scenario where the only new ingredient is a persistence on keeping the direction of each previous step with a non-isotropic noise (V 0 = 0 while κ and β are free parameters).This case is known as a Correlated Random Walk (CRW) in the literature. 28Thirdly, we can observe a different situation where the individuals feel the attraction wells but the underlying movement is a random walk such that active and reactive components are present (κ = 0 while V 0 and β are free parameters).We call this case Potential-driven Random Walk (PRW).Finally, we can combine both persistence and potential landscape (κ, V 0 , β are free parameters) in what we call Correlated Potential-driven Random Walk (CPRW).We have selected the values of the parameters for the PRW (V 0 and β ) and CRW (V 0 , β , and κ) models by optimizing their performance when looking at the empirical stop statistics as carefully discussed in the SI.The RW and CRW models take the same values as those from the equivalent models with potential attractive wells (PRW and CPRW).
The presented framework aims to study and identify the minimum ingredients necessary to capture the essential traits of human mobility at the scales studied.By means of hypothesis testing using the different proposed dynamics, we are able to assess the effect each additional parameter has on the observed movement patterns.The resulting statistics for each scenario are shown in Fig. 2. Both the the RW and CRW cases are obviously taken as null models.Lacking spatial coherence, they are unable to reproduce the spatial usage and orientation of the subjects or their stopping statistics.It is noteworthy, however, that the RW dynamics generate a flight velocity distribution (that of a Maxwell-Boltzmann distribution, see SI) close to the one observed in empirical data, indicating that a random noise term is a necessary addition to the model.As expected, the addition of correlation in the movement direction (CRW) leads to long flights (with an almost constant velocity), yet very large values of correlation are needed in order to partially reproduce the tail of the flight distribution (and the obtained results are not smooth due to the fact that all flights generated are excessively rectilinear, and this generates bias on the movement processing algorithm, see SI).
Adding the presence of potential wells significantly increases the accuracy of the model, validating the hypothesis of perceptual landscapes and stressing the need of including reactive components.Both the spatial distribution and temporal statistics of stops are recovered (with two distinctive time-scales), and the flight's velocities are again reproduced.The flight orientation is also distinctively shifted towards the direction of the fair promenade.The presence of long flights and the distribution of flight orientation, however, cannot be solely explained by the presence of attraction wells, since the absence of correlation in the noise term severely limits the probability of long displacements, which as discussed earlier is a distinctive feature of the observed data.Long flights cannot be accounted for by the dynamics presented, and are probably a result of a combination of interaction effects between individuals and the crowd, and directional bias due to the existence of a preferent direction imposed by the fair's main promenade.Confirmation of this fact is given by the CPRW dynamics, which include attraction and correlation effects, yet are still unable to capture the abnormally long (but not heavy-tailed) detected flights.Moderate improvements are detected on flight orientation and length distribution, yet the short scale of the stop statistics is lost.Even adding an extra ingredient accounting for selection of destinations by each individual -a probability for each potential well not to be considered by the individual -worsens the predictive power of the model (see SI).
Our approach links the two different contributions (active and reactive component) to the dynamics in a straightforward way.Furthermore, our approach through Eq. (3) makes it possible to quantify the balance between the competing components as expressed by the relative contribution to power developed by each of the acting forces F R and F A , which can be evaluated through the work generated by each of the two (reactive and active) forces (see SI).The PRW displays a ratio 70/30% between the components while the CPRW only has a 3% reactive contribution, which nevertheless is capitally important to reproduce spatial features of the walk.

Discussion
The present work explores the subject of human mobility in mid-range and non-crowded but mildly dense environments, from both empirical and theoretical perspectives by analysing and modelling the results of an experiment with pedestrians.The main contribution of the present paper consists in elucidating the minimal ingredients necessary to reproduce human mobility features in the context of a fair, where external and internal motion drivers are at play.
Our non-phenomenological modelling approach proposes an additive, constructive and simple framework where pedestrians feel the attraction of a collection of points of interest located in the fair.Starting with the most simple model (purely random walkers), we progressively introduce persistence and perceptual landscape (with attractive potential wells) aiming to untangle active (inherent factors) and reactive (external) contributions by only adding up to three parameters in the model (see Table 1).The combination of persistence and perceptual landscape under a Langevin dynamic framework succeeds in explaining the most important aspects in this context: the non isotropic character of the human motion, the exponential decay of stopping times statistics due to the attraction of activities in stands, the exponential decay in flight lengths statistics during movement phases (finding a highly peaked velocity distribution).The framework is also able to quantify the relative importance of reactive and active components, showing that even a relatively small and subtle reactive contribution can describe the basic traits of human motion in these contexts.
Directional memory effects are apparent in the way the different stands are visited, while a limit to the attention capacity of the participants in the fair is observed in the large-scale regime of about 10 minutes present in the stop duration statistics.The influence of the environment is patent from the spatial concentration around attention poles (attraction wells) and orientation of exploring patterns observed in the data.The presented framework is flexible enough to accept further enhancements.It would be possible, for instance, to add extra ingredients to account for destination selection or interaction with the crowdwhich might better explain the longest flights or the strong homogeneity in participants' velocities.We limit ourselves here to examining how the CPRW model might be extended to look at the destination selection effect, leaving other potential enhancements for future work.
Our modelling approach contrasts that of Continuous Time Random Walks (CTRWs), 32 because it aims to describe movement, which is an inherently time-continuous process, emerging from the interaction of several well-defined factors such as the presence of potential attractive wells. 30It then allows to test whether observed features from the data (such as Stop duration statistics) can be recovered under the hypotheses of the model, furthermore, it allows to explore the effects of data treatment and discretization and understand their biases.Last but not least, it further permits to quantitatively evaluate the balance between these components by means of physical magnitudes due to the straightforward interpretation one can extract from their computation.
Despite the success of the models in reproducing some of the observed features, the bimodal nature of these types of movement (stop-and-run states) together with human cognitive factors determining stand destination selection present a severe limitation to their description by means of a time continuous stochastic framework.Notwithstanding this, the presented models can be used to reproduce a variety of real world situations such as movement through parks, fairs, exhibition rooms and many other relatively small spaces with a medium-low density of individuals.The BP framework is flexible enough to easily modify the location of poles of attention (attraction wells) and then simulate the resulting pedestrian movements as people are attracted to them.This flexibility can be of great interest for re-designing spaces or anticipating pedestrian mobility in alternative spatial distributions.
Human mobility is a very complex process involving cognitive, physical and socio-economic factors, as well as a mix of spatial and temporal scales. 15Moreover, despite the efficiency of the different technologies used for tracking purposes, different technical limitations arise in each particular scenario, making its study an interesting cross-disciplinary area where technical, experimental and theoretical challenges from very different disciplines can meet.The present paper presents the results of one such cross-disciplinary collaboration, where modelling of human-related mobility in short ranges is covered.The junction of the open culture embedded in citizen science together with the endless possibilities in the advances in information technologies open new and interesting opportunities like the one exploited here.We hope that more experiments will follow and they will help tackle the challenges that the study of human mobility in medium ranges present.

Figure 1 .Figure 2 .Figure 3 .
Figure 1.Map of the fair indicating location of stands and stops and flights discrimination procedure.(top) Stand number one, coloured in red, shows the location of Bee-Path welcoming location, where participants were recruited.This image is produced from an orthophoto of "Institut Cartogràfic i Geològic de Catalunya" under a Creative Commons license CC-BY.(bottom) Each blue spot represents a GPS position recorded with a given time-stamp.Stop-and-run algorithm described in Methods is applied detecting the red circles of radius R stop as stopping points whose duration is ∆t s .Then, rectangular grid criteria whose width is calibrated with parameter R f light (bottom left) detects in this case five different flights with Euclidian lengths ∆r f (bottom right).

Table 1 .
Overview of characteristics and agreement with empirical data for Random Walk (RW), Potential driven Random Walk (PRW), Correlated Random Walk (CRW) and Correlated Potential driven Random Walk (CPRW) models."Dynamics"columnsindicate whether dynamics are driven by a potential and whether they incorporate persistence."Observables"columnscompare each model's dynamics with empirical utilization denisty, flight orientation, and stop and flight Complementary Distribution Functions (cf.Fig.2), using (-) to indicate disagreement, (+) moderate agreement, and (++) good agreement."Components" columns measure the importance of reactive and active components in each case (see SI for further details).Note that PRW shows a slight tendency to flight orientation, but less intense than CPRW, while CPRW is able to reproduce flight distribution when probability of skipping wells is introduced in the model as discussed in SI.As also shown in SI, velocity distribution of CPRW is wider and larger (median and average) than that empirically observed while PRW better coincides with observations. 9/12