Over the last few months we have been working on developing a agent-based model which explores the spread and containment of tuberculosis. Today is the first time that we show the model to a academic audience at the AAG Annual meeting. To give a sense of our research, below is the abstract:
Tuberculosis (TB) is a global problem and especially in developing countries. After human immunodeficiency virus (HIV) it is the most common form of death from an infectious disease. However, it is still unknown exactly how it spreads within a population. A geographic explicit agent-based model, with humans as agents, was created and applied to study the TB problem. Specifically the model was developed to see what epidemiological dynamics may occur, and what could be learned about the spreading of the disease. The model was developed in MASON and utilizes the GeoMason GIS extension. A Susceptible-Exposed-Infectious-Recovered (SEIR) submodel was created to model TB progression and linked to daily human activities. The slum of Kibera, Kenya (the largest urban slum in Africa, and an area where TB and HIV is particularly rampant) was chosen as a test-case. Detailed geospatial and demographic information from Kibera was used for the instantiation of the models spatial environment and demographic properties of the agents. Preliminary results obtained from standard model runs show that TB epidemics progress in staircase patterns of emergence and stabilization. Furthermore, it was found that TB was creating hotspots, or pockets of dense disease concentration, from where it was spreading. The results and lessons gleaned from the model can be easily incorporated into current health policies to mitigate TB's negative impact. Furthermore, the research shows the potential of ABMs in investigating infectious diseases.
To give a sense of what the model looks like below we show the full model running with 250,000 agents on the slum of Kibera, Kenya.
In the next movie we show the model running with only 50,000 agents but with a zoomed in section of the Kibera Slum. In this movie, you can see the agents going about their daily activities and how some become infected with TB.
This work would not of been possible without the work of my co-author Parth Chopra and the Thomas Jefferson High School for Science and Technology Mentorship Program.
It seems my interest into disease models is growing. While the development of the cholera model is still underway, over the summer I have had been working with a very talented high school student looking at the outbreak, spread and containment of tuberculosis (TB). Why might you ask? TB is a global problem with 1.8 billion people having a TB Infection, 8.8 million people infected with the TB disease, and around 1.5 million annual deaths. It is the second most common form of death from an infectious disease with the majority of cases in developing countries.
So we have been developing a model that explores how TB might manifest itself, spread within an urban setting and the potential to contain the disease. We have chosen as our test case the Kibera slum within Nairobi, Kenya. Agents in this model represent the residents of the Kibera slum. They are mobile and goal-orientated, seeking to fulfill one goal before moving on to the next. Goals are determined based on the agent’s characteristics (age, sex, etc.) as well as their needs (water, food, health etc.). The exact location they choose to go to is also affected by the distance. When agents interact with one another, they can be infected with TB. Infection is determined upon the amount of bacilli absorbed by agents and their immune response. The transition from infection to disease for HIV positive patients is also dependent on the patient’s CD4 cell count. What you see below is a poster we presented at Krasnow Institute Retreat.
To give a sense of the dynamics of the model, the movie below shows agents moving around the slum and how their health status changes as time progresses.
As the readers of the blog know, we have an interest in GIS, agent-based modeling and crowdsourcing. Now we have a paper that combines all these three elements. Its entitled "GIS and Agent-Based models for Humanitarian Assistance" and is published in Computers, Environment and Urban Systems.
The model itself was written in MASON and uses extensively GeoMASON. Data comes from several different sources (both raster and vector) including OpenStreetMap and LandScan. Below you can read an abstract of the paper and see a movie of one of the scenarios.
"Natural disasters such as earthquakes and tsunamis occur all over the world, altering the physical landscape and often severely disrupting people’s daily lives. Recently researchers’ attention has focused on using crowds of volunteers to help map the damaged infrastructure and devastation caused by natural disasters, such as those in Haiti and Pakistan. This data is extremely useful, as it is allows us to assess damage and thus aid the distribution of relief, but it tells us little about how the people in such areas will react to the devastation. This paper demonstrates a prototype spatially explicit agent-based model, created using crowdsourced geographic information and other sources of publicly available data, which can be used to study the aftermath of a catastrophic event. The specific case modelled here is the Haiti earthquake of January 2010. Crowdsourced data is used to build the initial populations of people affected by the event, to construct their environment, and to set their needs based on the damage to buildings. We explore how people react to the distribution of aid, as well as how rumours relating to aid availability propagate through the population. Such a model could potentially provide a link between socio-cultural information about the people affected and the relevant humanitarian relief organizations."
While GeoMason is still undergoing development. Mark Coletti has put together a Cookbook for 'recipes' for using GeoMason. The Cookbook is available from here.
It gives examples of how to read and write geospatial data along with using geospatial data within your agent-based model (e.g. having an agent follow a gradient) and much more. Each example is associated with a GeoMason model example.
Mark welcomes any comments so please send them. For example, what GIS functions do you want more information on? What are the common problems you have encountered using GeoMason?
One of the projects we are working on at GMU is exploring the the dynamics of refugee camps and the spread of diseases within such camps.
Our initial focus is on the the Dadaab refugee camps which are located in Kenya, approximately 100 kilometers from the Somali border. The camps themselves are homes to roughly 500,000 people, with nearly 99% of the population coming from Somalia. Within the camps the mortality rate is ~ 0.44/10,000 per day with diseases such as cholera and measles being among the causes of death.
Below are some movies of the prototype models that are currently being developed in Mason ABM toolkit and utilizing its GeoMason extension. The first movie shows a overview of the model dashboard, while the second show the spread of cholera within the area.
While the second movies (below) shows our first attempt at modeling one type of disease, that of cholera. In the simulation we pollute one bore hole with cholera and simulated how it might spread through the camp under specific conditions.
While this is still work in progress, we thought it worth sharing to see what feedback we may get. More details about the models will come soon.
We been working on adding more spatial agent based models examples to GeoMason, the GIS extension for MASON. These include a vegetation growth model utilizing raster data and a simple disease outbreak model utilizing vector data. See below for more details.
Vegetation Growth Model:
Eastern Africa has undergone sustained drought for over a decade placing a great strain on the local population. This demo introduces an agent-based model of grazing called Turkana South. The model makes use of NDVI data and monthly rainfall data to drive vegetation growth. After describing the model, the paper investigates the effect rainfall has on carrying capacity and how carrying capacity varies based on initial starting conditions. I conclude that carrying capacity is independent of initial population size.
Disease Outbreak:
This demo introduces a new agent-based model (ABM) for studying the spread of influenza through the schools and households of Fairfax County, VA. It is intended to explore the following questions. How does an epidemic outbreak spread through a school system? What containment approaches might be most effective at stopping an outbreak?
To find out more about GeoMason (including the data and source code for these models) click here.
GeoMason has recently been updated to support changes to MASON itself and I have contributed a few models to highlight the basic functionality of GeoMason and act as examples for how geographically explicit models can be built. Below are some of the new models that now come with GeoMason.
Sillypeds
This model demonstrates how one can use GeoMason to explore evacuations from a building. The simulation starts by reading raster data describing a building layout (converted from CAD files). The simulation randomly places a number of agents on walkable areas within side of the building. Once the agents have been placed on the ground, they follow the lowest cost path to the exit (in this example there is only one). The movie below demonstrates how the agents (red dots) move through the space, and through this movement congestion emerges around the exit. The yellow paths are traces of pedestrian moment.
Water World
Inspired by NetLogo's Grand Canyon Model. The aim of the model is to show how data in the form of a elevation, can be used as a foundation of a simple spatial agent-based model. Similar to the Netlogo model, the elevation data comes from the National Elevation Dataset. It was converted from an ESRI Grid into an ASCII grid file using ArcGIS.
Similar to Sillypeds, the elevation data acts as our terrain, in this case its Crater Lake in Oregon. Agents within the model (in this case water) fall at random over the terrain and then flows downhill over the terrain. If the water cannot flow downhill, it pools up and once the gradient is sufficient, the water flows. For example, water falling in Crater Lake, initially has to pool up until the water level is sufficient to breach the caldera. Once this occurs water flows out of the lake as highlighted in the movie below.
In the second movie (below) highlights the testing of the inner logic of the model, in the sense are the raindrops doing as they are expected to do. If you want to test this, uncomment out (e.g. remove '//') from either one of the two lines below:
//landscape = setupLandscapeGradientIn(); // landscape that slopes in
These lines can be found in the start method of WaterWorld.java file but ensure you comment out the (e.g. add '//' ) to the following line:
landscape = setupLandscapeReadIn("elevation.txt"); // read landscape from file
GridLock
This basic traffic model explores how agents travel to Tyson's Corner, Virginia for work. The idea is that if you increased the number of agents (people) more congestion will arise. To some extent this is similar to the GeoMason sim.app.geo.campusworld example.The model demonstrates how you can make agents move along networks (in this case road lines in the form of ESRI shapefiles) from their origin to their destination via a shortest path algorithm.
The number of agents is based census tract information i.e. the number of people who work in Tyson's Corner and their corresponding home locations which is restricted to Washington DC, Virginia and Maryland. The movie below shows the fully functional model.
Schelling Polygon
In this model we demonstrate how one can use polygons (such as census tracks) to create an abstract Schelling model stylized on Washington DC. The model reads in a ESRI Polygon shapefile and uses attributes of the shapefile to create Red and Blue agents and a number of Unoccupied areas. As with the traditional Schelling model, Red and Blue agents want to be located in neighborhoods were a certain percentage of their neighbors are of the same type. However, instead of using a Moore or Von Neumann which is common practice in cell based models. Here neighborhoods are calculated using the neighbors that share a common edge to the agent in question. If an agent is dissatisfied with its current neighborhood, it will move to a random Unoccupied polygon, regardless of whether or not this new location meets its preference. The movie below shows this movement.
Point Schelling Model
This model in a sense extends the Schelling Polygon model, however, instead of the polygon being the agent we take attribute data from the polygon model and create individual agents (see Crooks, 2010). This is based on the notion that much of the data we have comes at an aggregate level and often in some sort of vector representation of space such as census data. However, if we want to model the individuals or groups of individuals, we need to disaggregate the data.
To do this we create a number of Red and Blue agents based on population counts held within the polygon shapefile. As with the previous model, all agents want to be located in neighborhoods were a certain percentage of their neighbors are of the same type. However, instead of using a Moore or Von Neumann which is common practice in cell based models. Here neighborhoods are calculated using buffer distance from the agent in question. If an agent is dissatisfied with its current neighborhood, it will move to a random location, regardless of whether or not this new location meets its preference. Moreover, the model demonstrates how to link points (agents) to polygons along with some other basic geographical operations (such as union, point in polygon, buffer). The movie below shows this movement both at the individual level and at the aggregate (census track level).
SLEUTH: Urban Growth Model
This model shows a basic urban growth model based loosely on the SLEUTH model. In the sense, that we have only implemented the four growth rules (spontaneous, new spreading centers, edge and road-influenced growth) and not the self modification element of the SLUETH model. The model demonstrates how different layers (e.g. slope, land use, exclusion, urban extent - urbanized or non-urbanized, transportation, hillshade) can be read into a model to provide cells with multiple values. The movie below shows a specific growth scenario under specific coefficients (parameters) for Santa Fe, New Mexico.
More information about GeoMason can be found here along with the source code and data for all the models presented in this post.
GeoMason has recently been updated to support changes to MASON
itself and I have contributed a few models to highlight the basic
functionality of GeoMason and act as examples for how geographically
explicit models can be built. Below are some of the new models that now
come with GeoMason.
Sillypeds
This model demonstrates how one can use GeoMason to
explore evacuations from a building. The simulation starts by reading
raster data describing a building layout (converted from CAD files).
The simulation randomly places a number of agents on walkable areas
within side of the building. Once the agents have been placed on the
ground, they follow the lowest cost path to the exit (in this example
there is only one). The movie below demonstrates how the agents (red
dots) move through the space, and through this movement congestion
emerges around the exit. The yellow paths are traces of pedestrian
moment.
Water World
Inspired by NetLogo's Grand Canyon Model.
The aim of the model is to show how data in the form of a elevation,
can be used as a foundation of a simple spatial agent-based model.
Similar to the Netlogo model, the elevation data comes from the National Elevation Dataset. It was converted from an ESRI Grid into an ASCII grid file using ArcGIS.
Similar to Sillypeds, the elevation data acts as our terrain, in
this case its Crater Lake in Oregon. Agents within the model (in this
case water) fall at random over the terrain and then flows downhill over
the terrain. If the water cannot flow downhill, it pools up and once
the gradient is sufficient, the water flows. For example, water falling
in Crater Lake, initially has to pool up until the water level is
sufficient to breach the caldera. Once this occurs water flows out of
the lake as highlighted in the movie below.
In the second movie (below) highlights the testing of the inner
logic of the model, in the sense are the raindrops doing as they are
expected to do. If you want to test this, uncomment out (e.g. remove
'//') from either one of the two lines below:
//landscape = setupLandscape(); // uniform landscape, completely flat //landscape = setupLandscapeGradientIn(); // landscape that slopes in
These lines can be found in the start method of WaterWorld.java file but ensure you comment out the (e.g. add '//' ) to the following line:
landscape = setupLandscapeReadIn("elevation.txt"); // read landscape from file
GridLock
This basic traffic model explores how agents travel to Tyson's
Corner, Virginia for work. The idea is that if you increased the number
of agents (people) more congestion will arise. To some extent this is
similar to the GeoMason sim.app.geo.campusworld example.The
model demonstrates how you can make agents move along networks (in this
case road lines in the form of ESRI shapefiles) from their origin to
their destination via a shortest path algorithm.
The number of agents is based census tract information
i.e. the number of people who work in Tyson's Corner and their
corresponding home locations which is restricted to Washington DC,
Virginia and Maryland. The movie below shows the fully functional model.
Schelling Polygon
In this model we demonstrate how one can use polygons (such as census
tracks) to create an abstract Schelling model stylized on Washington
DC. The model reads in a ESRI Polygon shapefile and uses attributes of
the shapefile to create Red and Blue agents and a number of Unoccupied
areas. As with the traditional Schelling model, Red and Blue agents want
to be located in neighborhoods were a certain percentage of their
neighbors are of the same type. However, instead of using a Moore or Von
Neumann which is common practice in cell based models. Here
neighborhoods are calculated using the neighbors that share a common
edge to the agent in question. If an agent is dissatisfied with its
current neighborhood, it will move to a random Unoccupied polygon,
regardless of whether or not this new location meets its preference. The
movie below shows this movement.
Point Schelling Model
This model in a sense extends the Schelling Polygon model, however,
instead of the polygon being the agent we take attribute data from the
polygon model and create individual agents (see Crooks, 2010).
This is based on the notion that much of the data we have comes at an
aggregate level and often in some sort of vector representation of space
such as census data. However, if we want to model the individuals or
groups of individuals, we need to disaggregate the data.
To do this we create a number of Red and Blue agents based on
population counts held within the polygon shapefile. As with the
previous model, all agents want to be located in neighborhoods were a
certain percentage of their neighbors are of the same type. However,
instead of using a Moore or Von Neumann which is common practice in cell
based models. Here neighborhoods are calculated using buffer distance
from the agent in question. If an agent is dissatisfied with its
current neighborhood, it will move to a random location, regardless of
whether or not this new location meets its preference. Moreover, the
model demonstrates how to link points (agents) to polygons along with
some other basic geographical operations (such as union, point in
polygon, buffer). The movie below shows this movement both at the
individual level and at the aggregate (census track level).
SLEUTH: Urban Growth Model
This model shows a basic urban growth model based loosely on the SLEUTH model.
In the sense, that we have only implemented the four growth rules
(spontaneous, new spreading centers, edge and road-influenced growth)
and not the self modification element
of the SLUETH model. The model demonstrates how different layers (e.g.
slope, land use,
exclusion,
urban extent - urbanized or non-urbanized,
transportation,
hillshade) can be read into a model to provide cells with multiple
values. The movie below shows a specific growth scenario under specific
coefficients (parameters) for Santa Fe, New Mexico.
More information about GeoMason can be found here along with the source code and data for all the models presented in this page.
As many of us know more people are now living in cities than ever before. Over half (3.3 billion people) of the world’s population are located in urban areas and this proportion is predicted to increase to over 75 percent by the year 2100 (United Nations, 2007). What I find most interesting is that while cities are growing they are also constantly changing.
The reason I bring this up are twofold. First I recently stumbled upon a site from the NY Times entitled "Mapping America: Every City, Every Block" which shows data from the US Census Bureau's American Community Survey from 2005 to 2009. What is interesting is that there are several maps showing the distribution of racial and ethnic groups throughout the US along with the percentage of foreign born and how neighborhood have changed over time (similar work is also being done at CASA for the UK's population). Such data could come in handy for residential segregation models.
Secondly, as cities grow, the question is where will such growth occur or in some instances where will urban areas decline (e.g. urban shrinkage). Recently we started using GeoMason to explore urban growth using the SLEUTH model as our basis. In the movie below we explore a simple growth scenario around Santa Fe, New Mexico. The model, like the original has the 5 growth coefficients (Dispersion, Breed Spread, Slope, Road) which affect how the growth rules are applied. We also implement the same growth rules (that of Spontaneous Growth, New Spreading Centers, Edge Growth,Road-Influenced Growth) as described on the SLEUTH website. The only thing missing from the model is the self modification procedures during the run time of the model. Data for the model comes a variety of sources including the National Map, the New Mexico Atlas and ESRI.
Over the last few months I have been experimenting with GeoMason in terms of using both raster and vector data to build spatially explicit agent-based models. Overall, I have been impressed by the speed of which such models run at and the example models that come with it GeoMason are really useful.
Below are some of the test models we have developed for a course on entitled GIS and Agent-based modeling which was taught in the Department of Computational Social Science at GMU.
The first model is based on importing a geotiff of the National Elevation Dataset at 1 arc second from the National Map of Crater Lake, Oregon. After which water is added (which could be considered loosely as agents) and flows from high to low elevations, if the water can not flow over the surface it pools. As the movie below shows, over time, Crater Lake slowly fills up until the water breaches the caldera rim which allows the water to flow out. This model was inspired by the NetLogo Grand Canyon Model.
Moving towards vector data, below is a simple example of using GeoMason for a spatially explicit Schelling style of model of segregation where neighborhoods are not based on a regular square lattice but on irregular cells and in this case stylized on Washington DC. The model uses polygon boundaries of census tracks from the 2000 US census. In the model, each census track knows which other census tracts are its neighbors and only one agent occupies such a track. As in the normal Schelling styles of models, agents want to be located in neighborhoods where a certain percentage of their neighbors are of the same type. If an agent is dissatisfied with its neighborhood it moves to a new location. This movement causes more movement and the result is that areas become segregated.
The next movie, highlights a variant of the Schelling model. Whereby we take aggregate data and use this to populate the model with agents. The reason for this is that much of the data we have comes at an aggregate level and often in some sort of vector representation of space such as census data. However, if we want to model the individuals or groups of individuals we can take this data along with other information and use it as a basis of spatially explicit agent-based model. Basically, this model extends the polygon model above and creates agents based on attribute data held within the shapefile. While the model is highly stylized it demonstrates how data can be read into the model, how to create agents based on this data and how to link points (agents) to polygons along with some basic geographical operations (such as union, point in polygon, buffer).
To download GeoMason click here (note there a number of model examples here). For more information on GeoMason there is a technical report:
Sullivan, K., Coletti, M. and Luke, S. (2010), GeoMason: GeoSpatial Support for MASON, Department of Computer Science, George Mason University, Technical Report Series, Fairfax, VA.
Also when I have time I will provide more details on the models above and others using GeoMason.