Professional Documents
Culture Documents
Modeling Spatial Enviroment
Modeling Spatial Enviroment
Modeling Spatial Enviroment
Mingxin Zhang
College of Politics
National Defense University
Shanghai 201601, P. R. China
e-mail: zh.mingxin@gmail.com
Abstract-Spatial environment is a fundamental concept of environment is necessary, rather than cell/grid based and
agent-based modeling and simulation (ABMS), in which agents discrete.
exist and interact, can perceive and act. Common spatial envi-
ronment in ABMS is considered as a physical space (typically
a 2D grid) or as a virtual space that supports agent-to-agent II. LITERATURE REVIEW
interaction. However, in large-scale agent-based epidemiology
research,vector Geographic Information System (GIS) based
spatial environment is more popular. This paper introduces a Macal concluded that a typical agent-based model usually
new concept of 'Physical Container' to represent the static spatial includes three concepts [6]: Agent, Interdependency and En-
environment where agents stay. Movable physical container is vironment.
also introduced as a concept in the research to model transport In the context of a classic agent-based social simulation
vehicles. To show how the novel designs in the physical container
behave, this paper conducted several simulation studies and the (ABSS), the environment is usually represented by a geo-
results certified that the new concepts can greatly ease the model graphical area that may be real or fictitious. One of the
development work and increase the model efficiency during simplest methods of representing a fictitious geographical
simulation run. area is using grids or cells. When representing real areas,
Keywords-spatial environment; agent-based models; epidemic a vector Geographic Information System (GIS) based spatial
prediction and control environment is more popular [7].
A grid-based or cell-based agent-based simulation is also
I. INTRODUCTION called a situated agent-based simulation, by which agents can
interact through information exchange in the grids or cells.
Due to the increasing threat from epidemics, agent-based
Compared to situated systems, GIS-based systems provide a
epidemic models are getting more popular. The popularity
more realistic way to model spatial environments for agent-
of adopting agent-based methods comes from the fact that
based social simulation. Many middleware approaches are
it can characterize each agent with a variety of variables that
developed to link existing GIS and ABM models in order
are considered relevant to model disease spreading such as
to enable interaction between geographic data (fields and
mobility patterns, social network characteristics, health status,
objects) and agent-based process models. Generally, a GIS-
etc. [1]. Recently, due to the growth of computational power,
based spatial environment is more popular in current large-
large-scale agent-based modeling and simulation have become
scale ABSS models as it can not only deal with spatial data
possible for epidemic models [2, 3].
but also with other data such as culture, political ideology or
However, there are several limitations in the existing mod-
religion [8].
els . For example, most models consider the spatial environ-
ment as discrete cells/grids to help the model partitioning and
reduce unnecessary inter-node communication messages. Ex- III. MODELING AGENT ENVIRONMENT
amples include ABCCA and HLA-GRID-REPAST. In simple
cases , this may be a sensible approach when the movement of A. The Concept of Physical Container
the agents has no particular pattern or is very restricted [4].
In the previous research [9], the concept of agent environ-
However, in current agent -based epidemiology research, direct
ment is separated into physical container, social regulation and
physical contact (e.g. touching) or vector-borne contact (e.g.
functional entity. The physical container is used to represent
a droplet) outside closed rooms is also considered to be an
the spatial environment where an agent stays . Physical con-
effective method for the spread of disease [5], especially in
tainers are hierarchically organized and every agent has to stay
densely populated areas such as public transportation. Thus , a
in at least one physical container at any time.
detailed and refined representation of entities in a continuous
Typical physical containers are such as school, classroom,
This work is supported by National Social Science Foundation of China office, and bedroom, etc. A physical container can be formal-
under Grant I7CGL047. ized as follows:
538
required to assign an activity location . An acnvity location Co m pariso n of Sim ulat io n Perform ance o n Cache Syst em
was modeled as a physical container in this research. 350
Currently there are 18 types of static physical cont ainers 300 298
250
which are categorized into 6 categories. Obviou sly, these can
~ Wit h C a c h e
Syste m
200
not cover all the types in Beijing, for example , small shops 150 ' 143 • 148 • 150 _ Wit ho ut Cac he
in ' Consumption location s' and cinem as in ' Entertainment 100 y =2.6x + 13 7.2 Syst e m
well.
Besides static physic al cont ainers , we modeled a transporta- Figure I. Performance comparison in simulation with and without the use of
tion system including movable physical containers to execute cache system for a week
travel activitie s, which helps commuting agent s to determine a
route and give out the travel duration. The public transportation
From Figure 1, we can find that the execution time increa ses
system in the model is micro scopic, where we modeled all
linearly in both cases. However, the execution time in the
lines and stops of metro and bus system in Beijing. The public
situation without cache system is ten times longer than the
transportation in Beijin g contains 17 Metro lines, 227 Metro
situation with cache system in all the 5 settings, where we
stations and nearly 1,000 public bus and trolleybus lines in the
exclude the initial set-up time of the simulation run. Since
city, which make s it one of the largest public transportation
no epidemics are involved in this test, this cache system is
system s in the world .
supposed to benefit other large-scale social system research ,
Mod eled buses and metro trains will execute their schedules
as well.
on these route s based certain timet ables. The geographic in-
formation and routin g data of the transportation infrastructure B. 'GridZones ' Alg orithm
network are acquired from open source based OpenStreetMap
With the consideration of transport vehicle s as movable
1 by using the Java library osmo sis 2 . To show the topology
physical containers, this research included a public transporta-
of the whole public transportation network in Beijing, a
tion component into an epidemic model , where 19.6 million
graph is built in this model by the Java library jgrapht 3. It
agents can realistically travel through this component for daily
models stops as nodes (static physical containers) and routes
commuting purpose.
as links. For commuting vehicles (cars and taxis) on the
An algorithm called , GridZone s' was prop osed in Section
road network , we don't model the real road network s, but
III-B in order to optimize agents' routing proce sses. To
calculate estimated travel dur ation according to the distance
evaluate this algorithm, a test is conducted by measuring
and historic al statistical data on congestion.
the simulation performance between two situations when this
IV. SIM ULATIO N ST UDY algorithm is adopted or not. The simulation execution time
This section uses several tests to show that how the novel is recorded for both situations when the number of agents
design s in the physic al cont ainer behave in the simulati on increase from 1000 to 5000 for a simulation period of a week
study. (7 days). The comparison is shown in Figure 2.
A. Three-level Cache System of Physical Containers Compansion of Simulation Performance of the inclusion of 'Grid7,onc'
In the context of the case study, there are 8 million static 6000 5304
'"~
"9
location s in the city of Beijin g. A three-level cache system ~
5000
~ W i t h G r i d Zo n e
~ y = x + 141.8
we made a comparison between two experiments. The first 1000
143 144 144 146 147
experiment is to measure the simulation execution time for ~ ~ = =*= ~ = =*= ~L-
a simul ation period of one week (7 days) when the cache Agent Popu lat ion (X 1000)
539
'GridZones', all the connecting information for the bus/me tro TABLE r.
stops inside the zone are gathered together and stored in this R ES ULT S OF ' Hospitalized ' AG ENT S IN A BASELIN E SCE NARIO AFT E R 5
REPLI CATIO NS
'GridZones'. This design avoids the redundancy when the
connecting information is separated into different stops, and Resu lt Mean 95% Co nfidence Shap iro-Wilk
ensures the updating efficiency when one of the stops in the Interval Test (P Value)
Average Peak 362 [361.0, 363.0] 0.135
traffic graph is closed. Time (Hours)
Peak Number 652,598 [647,989, 0.9 189
C. Scenario of Including Public Transportation 657,207]
In order to test the quality of implemented physical contain -
ers, a scenario was des igned to test the impact of including
Avera ge Number of 'Hospitalized' agents (5 replications)
travel con tacts in movab le physical containers on disease
spread, where the microscopic public transportation system
was included in the model and agents can realistically 'travel'
through the city and have travel con tacts.
"""
Before studying this scenario, a base line scenario without • AV""'IJII Numt>er
l ines
the inclusion of public transportation was created to study the
disease dynamics at first, which is considered as a traditional
mode l for large-scale agent-based epidemic prediction. The
initia l condition for the model was that I in 2 million people
in the popu lation was in the 'Suspect' phase. The number
200 ..00 roo
of persons in the' Hospitalized' phase was recorded during Ti me (Hours)
TABLE I!.
R ES ULTS O F ' Hospitalized ' AGE NT S WH E N IN CL UDI NG TRAV EL C ON TAC TS
AFT ER 5 REPLI CATIONS
r""·
~
.
Lines
-
A ve<l g e ~ m D '"
L_ ~, ..mdl 95%CII
Resu lt
Average Peak
Mea n
375
95% Confidence
Inter val
[371.4, 378.6]
Shap iro-Wilk
Test (P Value)
0.7 147
J - Up pe( ~ oo nd l 95 % C I Time (Hours)
Peak Number 700, 138 [69 1,524, 0.4913
708,752]
From Table II, we can find both the ' Average Peak Time '
and 'Peak Number' follow a norma lly distribution as well. To
Figure 3. Number of 'Hospitalized' agents in a baseline scenario show the difference of the simulation results, we did statistical
tests using SPSS and present the outcome in Table III.
The major indicators and statistics are shown in Table I It can be seen from Table III that the p values for both
and the presented two KPls can intuitively show the dynamics the two indicators are are below 0.05 in the t-test. It means
of disease transmission. The first indicator 'Average Peak both the 'Average Peak Time' and ' Peak Number' in this
Time' shows the average time point when the number of scenario are different from the baseline scenario. That is,
' Hospitalized' agents reaches the highest value and the second including movab le physical containers in the mode l increases
indicator 'Peak Number' presents the number of' Hospitalized' the peak number of infected agents (7.3 %) in the experiment.
agents at the highes t point. Besides the mean value and 95% In addition, it does shift the infecting peak to a later time ( 14
confidence interva l, the p value of the Shapiro-Wilk Test is hours) according to the 'Mean Difference' for 'Peak Time' .
also given to test the norma lity of indicators. This result confirms the res ults in the other research [13].
It can be found from Table I that both the ' Average Peak The difference in 'Peak Number' is minor, which means travel
Time' and 'Peak Number' came from a norma l distribution. contacts in movab le physical containers are not the dominating
For the scenario of incl uding movab le physical containers, factor for the disease to transmit among peop le in the mode l.
we also conducted an experiment with 5 replications. For each Furthermore, in the base line scenario where movab le phys-
rep lication, the numbers of agents in the' Hospitalized' phase ical containers are excluded from the mode l, peop le are
were recorded and the statistical results are presented in Figure designed to have longer contact with their colleagues, families
4. or socia l networks for the saved travel time in the mode l. These
540
TABLE III.
T ESTS FOR EQU ALITY OF M EA NS BETW E E N BASELI NE A ND INCLUDING MOVABL E PHYSI CAL CO NTAIN ERS
longer contacts cause the 'Peak Time' of disease outbreak to Transmission. ACM Transactions on Modeling and
be slightly ahead (14 hours in the experiment) of the scenario Computer Simulation, 22(1): 1-25, December 20 II.
of ' including movable physical containers'. [4] Y Wang, M Lees, and W Cai. Grid-based partitioning for
The study showed the relatively limited effect on epidemic large-scale distributed agent-based crowd simulation. In
outbreak, and the results comply with other research findings 2012 Winter Simulation Conference, pages 1-12. IEEE,
[13]. As a matter of fact, it can be seen from the scenario 2012.
in this section that the model presented in this research [5] Stephen S Morse. Factors in the emergence of infectious
offers more flexible opportunities for policy makers to test diseases. Emerging infectious diseases, I (I ):7, 1995.
different interventions regarding travel, such as forbidding [6] C M Macal and M J North. Tutorial on agent-based mod-
students to take public transportation to schools or preventing elling and simulation. Journal of Simulation , 4(3) :151-
symptomatic passengers from using public transport. 162, September 201 O.
[7] Glenn I. Hawe, Graham Coates, Duncan T. Wilson , and
V. CONCLUSION
Roger S. Crouch. Agent-based simulation for large-scale
This paper introduces a new concept of 'Physical Container' emergency response. ACM Computing Surveys, 45( I): l-
to represent the spatial environment where agents stay in large- SI, November 2012 .
scale agent-based epidemic prediction and control. [8] D.E Adamatti. Interdisciplinary Applications of Agent-
We also introduced the movable physical container concept Based Social Simulation and Modeling. Advances in
in the large-scale agent-based epidemic prediction model. The Human and Social Aspects of Technology:. IGI Global,
metro stops and bus stops are modeled as movable physical 2014.
containers. [9] Mingxin Zhang. Large-scale Agent-based Social Simula-
Besides an effective three level cache mechanism to orga- tion - A Study on Epidemic Prediction and Control. PhD
nize large number of physical containers, an algorithm called thesis, Delft University and Technology, 2016.
' GridZones' was proposed in order to optimize agents' routing [10] Floriana Gargiulo, Maxime Lenormand, Sylvie Huet, and
processes. Omar Baqueiro Espinosa. Commuting Network Models
To show how the novel designs in the physical container : Getting the Essentials. Journal of Artificial Societies
behave , this paper conducted several simulation studies and and Social Simulation, 15(2): 1-17, 2012.
the results certified that the concept of physical container [II] Jason R. Andrews, Carl Morrow, and Robin Wood.
and movable physical container can greatly ease the model Modeling the role of public transportation in sustaining
development work and increase the model efficiency during tuberculosis transmission in South Africa. American
simulation run. Journal of Epidemiology, 177(6):556-561 ,2013.
REFERENCES [12] Y. Ge, R. Meng, Z. Cao, X. Qiu, and K. Huang. Virtual
[I] E Frias-Martinez. An agent-based model of epidemic
city : An individual-based digital environment for human
mobility and interactive behavior. Simulation , 90(8):917-
spread using human mobility and social network infor-
mation. In 2011 IEEE International Conference on Pri- 935, May 2014.
[13] Philip Cooley, Shawn Brown, James Cajka , Bernadette
vacy, Security, Risk, and Trust, and IEEE International
Chasteen, Laxminarayana Ganapathi, John Grefenstette,
Conference on Social Computing, pages 57-64, 2011.
[2] P Stroud and S Del Valle. Spatial dynamics of pandemic Craig R Hollingsworth, Bruce Y Lee, Burton Levine,
William D Wheaton, and Diane K Wagener. The role
influenza in a massive artificial society. Journal of
Artificial Societies and Social Simulation, JO( 4): 1-18, of subway travel in an influenza epidemic: a New York
2007. City simulation. Journal of Urban Health: Bulletin ofthe
[3] Jon Parker and Joshua M. Epstein. A Distributed Plat-
New York Academy of Medicine , 88(5) :982-995, October
2011.
form for Global-Scale Agent-Based Models of Disease
54t