Simulating Human Mobility with Agent-based Modeling andParticle Filter Following Mobile Spatial Statistics
Mingfei Cai

Yanbo Pang

mfcai@iis.u-tokyo.ac.jp
Department of Civil Engineering, The University of Tokyo
Meguro, Tokyo, Japan

Center for Spatial Information Science, The University ofTokyo
Meguro, Tokyo, Japan
pybdtc@iis.u-tokyo.ac.jp

Takehiro Kashiyama

Yoshihide Sekimoto

Institute of Industrial Science, The University of Tokyo
Meguro, Tokyo, Japanksym@iis.u-tokyo.ac.jp

Center for Spatial Information Science, The University ofTokyo
Meguro, Tokyo, Japan
sekimoto@csis.u-tokyo.ac.jp

ABSTRACT
Human mobility datasets collected from various sources are indispensable for analyzing, predicting, and solving emerging urbanization and population issues. However, such datasets are only available to the public after aggregation and anonymous processing. In
recent years, agent-based modeling approaches have addressed thisproblem by reproducing synthetic human mobility data throughsimulation. However, the development of such agent models typically requires a large amount of personal location histories as
training data for parameter learning, leading to cost and privacy
concerns. To overcome this disadvantage, we attempted to explore
optimal parameters using a particle filter to alleviate the strict requirement of the data. We tested our method in a local city in Japan
using aggregated real-time observation data collected from mobile
phone service companies. The results show that the proposed model
can achieve satisfactory accuracy using low-resolution data andcan therefore be easily used by local governments for municipal
applications.

CCS CONCEPTS• Information systems; • Computing methodologies → Modeling and simulation; • Networks → Location based services;

KEYWORDS
human mobility simulation, aggregated data, agent-based model,
particle filter
ACM Reference Format:
Mingfei Cai, Yanbo Pang, Takehiro Kashiyama, and Yoshihide Sekimoto.
2021. Simulating Human Mobility with Agent-based Modeling and Particle
Filter Following Mobile Spatial Statistics. In 29th International Conference
Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full citationon the first page. Copyrights for components of this work owned by others than theauthor(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or
republish, to post on servers or to redistribute to lists, requires prior specific permission
and/or a fee. Request permissions from permissions@acm.org.
SIGSPATIAL ’21, November 2–5, 2021, Beijing, China© 2021 Copyright held by the owner/author(s). Publication rights licensed to ACM.
ACM ISBN 978-1-4503-8664-7/21/11. . . $15.00
https://doi.org/10.1145/3474717.3484203

on Advances in Geographic Information Systems (SIGSPATIAL ’21), November
2–5, 2021, Beijing, China. ACM, New York, NY, USA, 4 pages. https://doi.
org/10.1145/3474717.3484203

1

INTRODUCTION

In recent years, the knowledge of human mobility has become indispensable for describing urban systems. It can serve as an auxiliaryfor city planning in various aspects. Simulation is a powerful approach for learning the underlying semantics of human mobility. It
can replicate and predict social phenomena using techniques suchas agent-based modeling. Real-time human mobility in a large area
can be perceived owing to the widespread use of devices. We canutilize multisource data to accurately understand mobility using
suitable tools to efficiently mine diversified data.
There are various models for human mobility simulation, suchas empirical models [7] and data-driven models [8]. However, mostof them require a large amount of individual-based data to ensure
accurate performance; these data may be expensive or even unavailable in certain areas. Furthermore, even though trajectory data
are anonymous and preprocessed, private information may stillbe leaked from underlying features, such as locations of overnightstays. In addition, privacy, security, or commercial confidentiality limit the use of mobility data sources outside the academic
field. Communities cannot access data. Even for local governments,
which may benefit the most from human mobility reconstruction, it
is unrealistic to utilize these expensive high-resolution data owing
to a limited budget.
Accordingly, none of the aforementioned models are suitable
for real-world municipal applications. Generally, the demand forhuman mobility data from local governments has the following
characteristics:• Low cost. The price of training data should not exceed thebudget.
• High resolution. The resolution of data must at least maintain the individual features of the population within a governing district.
• Real-time data. The data must be real time to perform timeseries analysis.

SIGSPATIAL ’21, November 2–5, 2021, Beijing, China

Cai et al.

unique types [9]. In this study, we further simplify these travel
patterns into three types depending on the Nationwide Person Trip
Survey in Japan [1] and assign these travel patterns to the synthetic
population based on demographic attributes, as follows:• Workers follow the home-work-home activity chain. This
type comprises 70% of the population aged 18–65 years. The
location choice procedure assigns a working place to agents.
• Students follow the home-school-home activity chain. They
are aged 6–18 years. Each agent is assigned the school thatis the closest to a home.
• Others follow the home-random place-home activity chain.
This type includes homemakers, freelancers, and other noncommuters.

Figure 1: Overview of this study.
Most of the previous research has focused more on the accuracyof simulation results than on cost and actual applications. Our goal
was to use low-cost data to reconstruct human mobility for local
governments. In this study, rather than using trajectory data fortraining, we use real-time aggregated mesh data to facilitate humanmobility reconstruction. We select Nanto in Toyama Prefecture foranalysis. It is a typical local city with an appropriate size. Additionally, a large amount of observation data is not available for this city,
unlike Tokyo and Osaka. We synthesize the population from thenational census and implement an agent-based model to retrieve
the resolution. Thus, we can disaggregate mesh observations andinvestigate individual behaviors. Moreover, we apply a particle filter(PF) to explore the potential solution space and efficiently search
for the best case.
Overall, considering the behavior of all agents, we can maintainaccuracy at the macroscopic and microscopic levels. The results
indicate that the proposed model can simulate human trajectories
with high accuracy while considering mesh observations and opensource census data. Figure 1 presents an overview of this study. The
contributions of this study are as follows:• We develop an agent-based model with multilevel decisionmaking rules, which can reconstruct citywide human trajectories using low-cost data and is suitable for local governments.
• We design a PF that is customized for human mobility todescribe the non-linear relationship between aggregatedmesh data and discrete trajectories, thereby solving a oneto-many dilemma.
• We test the results based on diversified metrics for humanmobility to comprehensively analyze our output and prove
its validity.
The remaining sections are organized as follows. Section 2 introduces the methodology. Section 3 describes the experimental
details. Section 4 presents the results. Section 5 summarizes thepaper.

2 METHODOLOGY
2.1 Agent-based Model
Agent-based modeling is a powerful simulation technique for disaggregating data and analyzing travel behaviors at the individuallevel [2]. As the simulated trajectories generated from agent models
do not refer to an individual’s actual behavior, the results may be
open to the public without privacy concerns. Most individual daily
travel patterns follow simple rules [10], which are of seventeen

We use the discrete choice model [6] to determine the destinationfor each agent. In particular, the utility of individual 𝑛 associatedwith alternative 𝑖 in choice set 𝐶 is given by
𝑈𝑖𝑛 = 𝑉𝑖𝑛 + 𝜖𝑖𝑛(1)where 𝜖𝑖𝑛 is a random term that captures the unobserved characteristics of individuals and alternatives as uncertainty, and 𝑉𝑖𝑛 is
the deterministic part of the utility value.
An agent evaluates the utility of alternatives in the choice set,
which captures the preference. The attributes consist of the night
population, number of companies and places of business, numberof employees, and travel distance. Therefore, the probability ofalternative 𝑖 being chosen by individual 𝑛 is derived using themultinomial logit model [4], as follows:

𝑃𝑟 (𝑖 |𝐶𝑛 ) = Í𝑒 𝜇𝑉𝑖𝑛𝑗𝑛 ∈𝐶 𝑒𝜇𝑉𝑗𝑛

(2)

Similarly, there is no direct information about the departure/return
time choices of individuals. Instead, we capture the departure time
distribution from the Nationwide Person Trip Survey in Japan andsample random variables from the distribution to determine thebehavior.
Based on the Nationwide Person Trip Survey in Japan until 2005,
we assign the transportation mode of "Vehicles" to the trips with
distances of over 1 km and "Walk" to the remaining trips. We use
the shortest-path algorithm to calculate the route [5] considering
the transportation mode and derive the movement speed from theroad network conditions.

2.2

Particle Filter

A PF is a filtering method that can approximate a probability density function (PDF) with an intractable integral for the posterior
using Monte Carlo approaches [3]. It is suitable for nonlinear andnon-Gaussian dynamic systems such as cities. In this study, we
use the PF to analyze the results of the agent-based model. However, the setting of the human mobility problem is complex. Rather
than monitoring one object, the proposed method must consider
all agents within one city, thereby significantly increasing the dimensionality. Thus, we must design a customized PF for the humanmobility problem.

Simulating Human Mobility with Agent-based Modeling and Particle Filter Following Mobile Spatial Statistics

In our setting, each particle represents one possible simulated
world, including the sequence of state vector 𝒙𝑡 , that is, the trajectories and the other settings. The state refers to the position set of
agents.
In the sampling phase, the PF generates 𝑁 particles and lets theagent-based model determine the next position of all individuals.
Then, in the update phase, the PF uses real-time observation 𝒐𝑡
to correct the prior probability distribution from the agent-basedmodeling and obtain the posterior probability distribution. Every
particle is weighted to measure the likelihood of matching theactual population distribution. The result is the expectation of state𝒙.
To prevent the degeneracy problem, which implies that onlya small number of particles contribute to the result, the PF uses
multinomial resampling to preferentially select particles with ahigher probability to replace those with a lower probability. In
addition, the PF retains sufficient particles with a lower probability
to ensure that it can detect strongly nonlinear behaviors. Thus, thePF can select the results that are closer to the truth from agentbased modeling. We perform the calculation at different time steps
to recursively evaluate the weight using Equation 3.
𝑤𝑡𝑖 ∝ 𝑤𝑡𝑖 −1

𝑝 (𝒐𝑡 |𝒙𝑡𝑖 )𝑝 (𝒙𝑡𝑖 |𝒙𝑡𝑖 −1 )𝑞(𝒙𝑡𝑖 |𝒙𝑡𝑖 −1, 𝒐𝑡 )= 𝑤𝑡𝑖 −1 𝑝 (𝒐𝑡 |𝒙𝑡𝑖 )(3)

In this study, we adopt Equation 4 to calculate the likelihood𝑝 (𝒐𝑡 |𝒙𝑡𝑖 ), between the predicted and observed population distribution. An advantage of this method is that a mesh with a larger
population in the ground truth will matter more.
𝑝 (𝒐𝑡 |𝒙𝑡𝑖 ) =3

𝒐𝑡2∥𝒐𝑡 − 𝒙𝑡𝑖 ∥ 2(4)

EXPERIMENTThe target area of the experiment is Nanto, Toyama Prefecture,
which is located near to the center of Japan. The area of Nanto is668.64 𝑘𝑚 2 , and it is a typical local city with a simple urban structureand no nearby metropolitan region; therefore it is appropriate forthe analysis.
NTT Docomo Inc. provides aggregated mobile phone data. It preprocesses raw call detail record data and converts it to aggregateddata by enumerating the number of people within the scope toconceal private information. The aggregated data have the formatof timestamp, mesh ID, and population. The data focus on a 500
m × 500 m mesh, and the definition of the mesh is provided by
the Ministry of Land, Infrastructure, Transport, and Tourism ofJapan. We use the data for October 15, 2019, which include usersof the NTT Docomo telecommunication network. Open-source
data are also used. The model uses the Japan National Census toinitialize agents and the Nationwide Person Trip Survey in Japanto determine the behaviors in the agent-based model. These two
sets of data are obtained from the Statistics Bureau of Japan [11].
Moreover, Zerin Co., Ltd. [12] provides infrastructure data for the
initialization of agents and al data for the determination of features.
We generate 53601 agents for the simulation. The number offacilities in Nanto and Toyama Prefecture is 34053 and 351571,
respectively. The simulation starts at 5 AM and ends at 9 PM. The

SIGSPATIAL ’21, November 2–5, 2021, Beijing, China

Figure 2: The Pearson Correlation Coefficient between theobservation and simulation. Each dot represents a 500m ×500m grid in the target area, while x-axis is the observationand y-axis is the simulation. R is the value of the COR, forwhich the closer to one, the better result. The points close
to the y-axis mean the overestimate error and those close to
the x-axis mean the underestimate error. From the COR, theaccuracy degenerates in the middle of day.

time interval for agents is 6 min. We use multi-observation to
analyze the consequences in detail. The experiment is performedon the Amazon Web Services EC2 m5.8xlarge instance with 32 CPU
cores and 128 GB memory.

4

RESULTSFirst, we analyze the correlation coefficient (COR) between thepredicted and observed data. The scatter plot for different hours isshown in Figure 2. The COR is more than 0.8 early in the morningand late at night. This is because most agents stay at home; hence,
movement patterns are not related to the population distribution.
The COR is approximately 0.7 in the middle of the day; this is acceptable for use of coarse-grained training data. The COR decreases
significantly at 9 AM; this is when most commuters are on thetrips to their destinations. The distribution of points shows thatthe number of points close to the y-axis increases during the rush
hour, which leads to a low COR. This indicates that the proposedmodel overestimates agents in several meshes. As the scatter plot
does not elucidate the spatial distribution, we compare the resultson the map.
Figure 3 illustrates the comparison of the predicted and observed
population distribution. Note that there are four reddish clusters
within the city, which are the downtown areas with numerous
facilities. The size of the clusters in the ground-truth data is smaller
than the predicted size. This suggests that the proposed model canfind the center of the district but is insensitive to its border. In
addition, the proposed model simulates a smaller population in thecore urban area. The difference between the predicted and observed
population is remarkable from the rush hour until the afternoon,

SIGSPATIAL ’21, November 2–5, 2021, Beijing, China

Figure 3: The comparison of mesh population distribution
between the observed and predicted result. The differenceis significant in the middle of the day and the error source
mainly comes from the center area of the city.

when most commuters tend to move. Hence, the utility function
does not guide agents to the right areas.
Link-based traffic volume is a significant metric that indicatesthe moving status of agents. Figure 4 shows the difference between
the predicted and observed link-based traffic volume. Overestimation occurs mainly for trips between the east and west of the city,where numerous facilities are located. Moreover, as the comparison
only includes base roads, short trips through other paths may notcontribute to the volume calculation, resulting in underestimation.
This can be due to the inappropriate penalty of distance factors,
which misguides agents to travel to facilities in the vicinity.

5

DISCUSSION AND CONCLUSION

We propose an agent-based model for reconstructing human mobility. The model is improved using a PF that can extract valuable
information from the aggregated mesh observations for budget andprivacy protection.
One of the difficulties in generating accurate human trajectories
is the application of a good measurement rule. Although there are
numerous widely used statistical distances to measure the likelihood of two PDFs, most of them are unsuitable for human mobility
simulation. To address this problem, we redefine the likelihood tomake the PF compatible with the human mobility scenario. First,
we consider the likelihoods of different PDFs of the population
distribution. Second, we prevent sample impoverishment, which
implies that particles are hardly diversified. In terms of the tradeoff between accuracy and computational resources, the proposedmodel can resolve the high-dimensional problems that frequently
occur in the PF and reconstruct citywide human movement.
One limitation of the proposed method is that it does not consider contextual information, such as points of interests. In future
work, we will improve the performance of our model to achieve
more efficient and accurate simulation. We plan to revise the utility
function to reflect the semantics of the city structure comprehensively. Moreover, we will consider the time factor to eliminate thepredetermined set-off possibility to improve generality.

REFERENCES[1] [n.d.]. Results from the 4th Nationwide Person Trip Survey. https://www.mlit.go.
jp/crd/tosiko/zpt/pdf/zenkokupt_gaiyouban_english.pdf. Accessed: 2021-05-30.

Cai et al.

(a) Simulated link-based traffic volume within one day.
The value in the legend is the absolute traffic volume.

(b) Simulated link-based traffic volume comparedwith traffic census. The value in the legend is the percentage of difference accounting for the observation.

Figure 4: The simulated result of the link-based traffic volume and the comparison with the predicted result and national traffic census. The main error source comes from theoverestimate number of agents moving to the south part ofthe city.
[2] Michael Balmer, Konrad Meister, Marcel Rieser, Kai Nagel, and Kay W Axhausen.
2008. Agent-based simulation of travel demand: Structure and computational performance of MATSim-T. Arbeitsberichte Verkehrs-und Raumplanung 504 (2008).
[3] Fredrik Gustafsson, Fredrik Gunnarsson, Niclas Bergman, Urban Forssell, Jonas
Jansson, Rickard Karlsson, and P-J Nordlund. 2002. Particle filters for positioning,navigation, and tracking. IEEE Transactions on signal processing 50, 2 (2002),
425–437.
[4] Jerry Hausman and Daniel McFadden. 1984. Specification tests for the multinomial logit model. Econometrica: Journal of the econometric society (1984),
1219–1240.
[5] Takehiro Kashiyama, Yanbo Pang, and Yoshihide Sekimoto. 2017. Open PFLOW:
Creation and evaluation of an open dataset for typical people mass movement
in urban areas. Transportation research part C: emerging technologies 85 (2017),
249–267.
[6] Daniel McFadden et al. 1973. Conditional logit analysis of qualitative choice
behavior. (1973).
[7] Michael G McNally. 2007. The four-step model. Emerald Group Publishing
Limited.
[8] Yanbo Pang, Kota Tsubouchi, Takahiro Yabe, and Yoshihide Sekimoto. 2020. Intercity Simulation of Human Mobility at Rare Events via Reinforcement Learning.
In Proceedings of the 28th International Conference on Advances in Geographic
Information Systems. 293–302.
[9] Christian M Schneider, Vitaly Belik, Thomas Couronné, Zbigniew Smoreda, andMarta C González. 2013. Unravelling daily human mobility motifs. Journal of
The Royal Society Interface 10, 84 (2013), 20130246.
[10] Chaoming Song, Zehui Qu, Nicholas Blumm, and Albert-László Barabási. 2010.
Limits of predictability in human mobility. Science 327, 5968 (2010), 1018–1021.
[11] Ministry of Internal Affairs Statistics Bureau and Communications. 2021. Japan
National Census Data. Retrieved June 9, 2021 from https://www.stat.go.jp/english/
index.html[12] LTD. ZENRIN CO. 2021. ZERIN Open-source Data. Retrieved June 9, 2021 fromhttps://www.zenrin.co.jp/english/index.html