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.
Following on from a previous post on traffic modeling with agent-based models, I have been thinking of other work in this area and came across the following movies on Youtube. The first is a traffic simulator from Martin Treiber. What is interesting is the "coffeemeter" that gives an impression of the accelerations and jerks in the traffic. You can investigate this model further here: http://www.traffic-simulation.de/ or watch the movie below.
The question you might be asking in yourselves is, do such models work in reality? The mathematical theory behind these so-called "shockwave" jams was developed more than 15 years ago using models that show jams appear from nowhere on roads carrying their maximum capacity of free-flowing traffic – typically triggered by a single driver slowing down. Below is a movie of the NetLogo Traffic Basic Model exploring this principle.
Hopefully the movie above helps add something to your question. But if not check out the next movie (make sure the sound is on). In which a team of Japanese researchers recreated the phenomenon on a test-track by putting 22 vehicles on a 230-meter single-lane circuit. Drivers were asked to cruise steadily at 30 kilometers per hour, and at first the traffic moved freely. But small fluctuations soon appeared in distances between cars, breaking down the free flow, until finally a cluster of several vehicles was forced to stop completely for a moment.That cluster spread backwards through the traffic like a shockwave. Every time a vehicle at the front of the cluster was able to escape at up to 40 km/h, another vehicle joined the back of the jam. The full article can be read in New Scientist (click here).
Moving away from traffic jams, as the previous post highlighted we can also use agent-based models to look at traffic intersections. The movie shows a more complicated intersection than in the last post and shows how different intersections can be visualized and modeled.
But while the above movie is rather simplistic, agent-based models can be developed from such simple situations to more complex one. For example, if you can model one type of intersection what is stopping you for modeling more? The movie below shows a more complex set of intersections using Paramics (however, this is noted to be a microsimulation model, if you are interested in finding out the difference between microsimulation and ABM see here).
From a local scene we can also turn to exploring more larger scenes such as entire metropolitan regions. The movie below is of that of TRANSIMS microsimulation-agent based model applied to downtown Chicago:
What I find so interesting about such traffic models is how one can go from basic models at the micro level and scale up such models (and of adding more complexity) to explore more macro phenomena such as traffic jams at metropolitan scales.
After spending time in the US, I am amazed how much one has to drive and this got me thinking about using agent-based models for traffic simulations (which is a large body of literature accompanying it). It also relates to my interests in urban systems and the fact that as cities have grown, transportation technologies have evolved (from walking, to trains etc), and now the automobile has become the dominant mode of transport for moving within and between cities. Trips range from journeys to work to shopping trips. The wide spread adoption and use of automobile is also one of the contributors to sprawl (in its many shapes and forms) as the car is not restrained by frequent stops or set routes, for instance such as trains are. Thus, if one can understand the relationships between land use and transportation one can investigate issues relating to urban sustainability. This is where agent-based models come in, in the sense they allow one to focus on the behavior of people. For example, how people decide to go to work.
ABM also allows us to explore simple thought experiments and how more aggregate results emerge from individual interactions such as: what is more effective, a four way stop or a traffic lights at a road intersection? The simple agent-based model presented below utilizes MASON and was created by Omar Guerrero of the CSS department at GMU. The rules of the model are simple, in the sense that at a four way stop, the vehicle that is first to arrive, it is first to move, unless two vehicles arrive at the intersection at the same time and then the vehicle has to give way to the car on the right. While at traffic lights vehicles must stop at red lights. The movie below shows part of the graphical user interface for a particular model run of both a four way stop and traffic light.
Even though this is a simple model, one can explore a number of issues such as how these different intersection configurations impact on the flow of traffic under different volumes of traffic. For example, at low traffic volumes in general, the stop sign is more effective (i.e. allows more cars to cross) than the traffic light. However, at greater traffic volumes the traffic lights out performs the four way stop (in the sense there are more cars in queues) but also with high traffic volumes, one can see oscillations in traffic waiting at the lights while the four way stops create long queues of traffic as shown in the figure below:
Moving away from micro patterns of traffic flows one can use ABM to explore daily commuting. For example, traffic models such as TRANSIMS or MATSim allow for the study of entire metropolitan regions and how traffic jams etc. form. To give a simple example of such a movement, the model presented below illustrates how many individuals can cause traffic jams. The model (using GeoMason) is based on commuters working within the Tyson’s Corner area of Virginia which boarders Washington DC. We take road and travel to work data from the US census and use this as the basis for our model.
The road data acts as a basis for our agents (red) to move from their homes (areas shaded green) to Tyson’s corner and the census data provides us with the number of agents who travel to the area on a daily basis. The agents attempt to find the shortest path from their home to the destination with preferential attachment to highways and freeways over smaller country roads. By running the model, cars start at homes and travel towards Tyson’s Corner and as more cars join certain sections of roads, traffic jams start to form (as speed is a function of the number of cars on a specific section of road). For example in the movie above, individual cars can be distinguished when they are not clustered but when traffic density increases, larger clusters develop.
The Business Assessment Model (BAM) evaluates trajectories of People, Performance and Planet (3P) of a single company as well as of the whole market system as a function of business decision of actors, exogenous events in the broader socioeconomic environment or both.
BAM computes the cumulative di difference between predictions of the perturbed and original 3P trajectories in order to conduct analysis of decisions within the medium run planning horizon.
Figure: Integrated 3P trajectories comparing system-level dynamics of both Baseline and Variant scenarios
Download self contained, ready to run version of the BAM simulation used in the "Comprehensive Assessment of Businesss Decisions" working paper (zip file) and associated presentation (ppt file) on running and interpreting outputs;
This six-day, non-credit, course is a unique opportunity to work with a team of experienced computational social scientists to explore and understand the application of new interdisciplinary approaches to modeling and making decisions involving the operations of social systems. Participants will imerse themselves in an intensive tour of the field of Computational Social Science, a broad set of efforts that seek to explain and predict how large-scale human systems from organizations to urban systems, from economies to society as a whole, evolve, react to stresses and stimuli, and cooperate and compete. Participants will hear presentations from experts in the field and engage in intensive dialoguing, demonstrations, and policy scenarios.
Computational Social Science (CSS) is a relatively new interdisciplinary science in which social science questions are investigated with modern computational tools. Computational social scientists investigate complex social phenomenon such as economic markets, traffic control, and political systems by simulating the interactions of the many actors in such systems, on computers. They hope to gain insights which will lead to better management of the behavior of the larger social systems, i.e., prevention of market crashes, smoothed traffic flow, or maintenance of political stability. The intractability of many social problems calls for the new approaches provided by computational social science.
CSS is a highly interdisciplinary field that requires teams to plan and complete projects, be they undertaken by government, industry, or non-profit entities. Project managers of such teams, overseeing all elements of project design and execution, tend to hold PhDs. The MAIS concentration will train students to be members of these project teams, able to meaningfully contribute to background research and to project design, execution, and communication.
Prior background should include a bachelor’s degree in one of the social sciences, in computer science, in engineering, or in a relevant discipline, as well as undergraduate courses in these and related areas. Bachelor’s degrees in other areas are also eligible, but the student may be required to take additional courses in social science, mathematics, or computer science as prerequisites to admission.
This concentration will be available in fall 2011.
Concentration Requirements (Catalog Year 2010-2011)
Six core courses (18 credits)
Three required courses (9 credits): CSS 600, 605, 610
The required CSS courses provide an understanding of the conceptual, technical, and practical foundations of computational social science.
The electives provide an understanding of the technical foundations and current work in at least two subfields of computational social science.
One research courses (3 credits) chosen from: CSS 796, 898, 899
The research course provides students with exposure to the most current ongoing research in the field and allows them to further develop their computational research expertise.
Three-four elective courses (9-12 credits)
The electives allow students to acquire a substantive specialization as well as additional training in social and computational science. Because of the broad spectrum of social science phenomena, methodologies, and student backgrounds, there is a large pool of potential courses. Electives may include any Mason master’s-level course in computational social science, social science, computer science, statistics, or other quantitative methods such as data visualization, information technology, and geographic information science. Electives should be selected in conjunction with and approval of the student’s advisor and the Director of CSS Graduate Studies. If the student does not have prior coursework in multivariate statistical analysis, the electives should include at least one such course relevant for the student’s chosen specialization.
Students who elect to do a 5-credit project or a thesis take 9 elective credits. Students who do a 2-credit project take 12 credits.
Proposal (1 credit): MAIS 797
Project (2-5 credits) or thesis (5 credits): MAIS 798 or MAIS 799.
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.