Thursday, December 30, 2010

GeoMason: Geospatial Support for MASON

MASON (Multi-Agent Simulator Of Neighborhoods) developed jointly at George Mason University's Evolutionary Computation Laboratory and the Center for Social Complexity has recently added an extension called GeoMason which allows spatially explicit models to be incorporated into the MASON.

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.

3 comments:

Piprrr said...

With regards to the Crater Lake simulation, what part of GeoMason was used for that? Was the GDAL raster importer used? Or some sort of computation between raster and vector layers?

Andrew Crooks said...

For Crater Lake, we just used the a simple Txt file importer. Should we have used GDAL. Is there an example of this?

Piprrr said...

A simple ASC text importer is fine. GDAL isn't necessary as that entails a lot of work to get it set up properly.

However, using the GDAL importer has that advantage of supporting a huge variety of data formats. My current install of GDAL claims it supports 86 different formats.

I do have some personal GeoMason code that uses GDAL. I might turn that into a demo, since there seems to be some interest in it. (And I should cobble together a page for step by step instructions on installing GDAL for use with GeoMason as it can be very confusing, especially for those a little weak in programming.)