Showing posts with label Space. Show all posts
Showing posts with label Space. Show all posts

Wednesday, March 21, 2007

DUEM

The Dynamic Urban Evolutionary Model (DUEM) (Batty et al., 1999) is described by as a typical Cellular Automata/Cellular Space model (Batty and Xie, 2005). Its purpose is to simulate urban growth (sprawl) thus exploring urban development. It does this by providing five different land-uses. That of housing, manufacturing/primary industry, commerce and services, transport in the form of street and road networks and vacant land. Land-use changes due to specific rules. Land-use also has a life cycle, which results in land-uses spawning new ones. The model operates on three different spatial scales: local neighbourhood, through to district to the region.

The DUEM software is written from scratch using Visual C++ with loose coupling to GIS through the importation of raster files. Figure 1 demonstrates the typical user interface which allows users to plant various land-use seeds and watch the environment evolve both in space and time (compare Figures 1 and 2). The software additionally shows how various trajectories of different land-uses change over time (Bottom three windows of Figures 1 and 2). This highly visual interface conveys a large amount of information such as aggregated outcomes, and statistical trends, in an easy to digest way, which helps with the understanding on how the model works. 

Figure 1: Evoluction of the landscape

Figure 2: Further evolution of the landscape


If you interested in running the model it can be downloaded from here.

References for further Reading:

Batty, M. and Xie, Y. (2005), 'Urban Growth Using Cellular Automata Models', in Maguire, D.J., Batty, M. and Goodchild M, F. (eds.), GIS, Spatial Analysis and Modelling, ESRI Press, Redlands, California, pp. 151-172.

Batty, M., Xie, Y. and Sun, Z. (1999), 'Modelling Urban Dynamics through GIS-Based Cellular Automata', Computers, Environment and Urban Systems, 23(3): 205-233.

Xie, Y. and Batty, M. (2003), Integrated Urban Evolutionary Modeling, Centre for Advanced Spatial Analysis (University College London): Working Paper 68, London, England.

Wednesday, September 27, 2006

Repasts Raster GIS and Sugar Scape models

Following on from Christians ‘How to create a .pgm file from an .ascii file’ post I thought it would be useful to provide some models that show how this type of information can be loaded into Repast. Repast provides two models that use images that to create the basis of artificial worlds: the Sugar Scape model and a GIS Model (based on Raster data).

The GIS Model (top image), uses the RasterSpace class and reads in a .txt file (e.g. an .ascii file that can be outputted from ESRI ArcGIS. While the Sugar Scape Model (bottom image) reads in a .pgm file to great a Object2Dtorus space

The original source code for both models can be accessed through the RepastJ download. Alternatively, one can run the Sugar Scape or GIS Model by clicking these links (sorry these models will only run on a windows operating system)

Monday, March 27, 2006

Topology and Representation in Repast

The use of GIS vector data has the advantage giving realism to models. Within Repast there are numerous ways of creating and calculating topology (e.g. which polygons are next to which polygons or which polygon a certain point is within). For representing the model (i.e. the displaying of vector data like maps). There are also numerous ways as can be seen below using either Repast.J or Repast.Net :

Topology and Representation with Repast.J
Within the current version of Repast (3.1) to represent vector (points, lines and polygons) topology the user has a few options with a set of predefined Repast classes (anl.repast.gis libraries).

The open source root which has no reliance in ESRI (means people who don’t have ArcGIS can still use programs once created) . You can use the OpenMap Java library which can be used both for both topologic calculations and for representations – (however within OpenMap its all in a Lat/Lon structure (decimal degrees which is an issue for representing small areas such as pavements but it is possible (more on this in the future). Another option is to use OpenMap for representation (display of the model) and JTS 1.4 topology suite for calculations (which I use and find it OK but tricky at times due to the precision of decimal degrees for small areas but the calculations appear to be easier). A third option is to code a representation tool by yourself or find one such as OpenJump but this requires a lot of effort.

If you want to use ESRI along with options in Java, you can use JTS 1.4 for calculations and Agent Analyst for representation (display). Agent Analyst is a tool developed by the Repast team, to refresh the ArcGIS 9.x screen after every Repast step. Problem here is that the shapefiles need to be preloaded into ArcGIS before starting the model so one can visualise the change.


Topology and Representation with Repast.Net

ESRI option using Visual Studio, you can use JTS1.4 topologic suite - Vivid Solutions is now also available as GeoTools.NET for Visual Studio (C# and Visual-Basic) which includes all the Java Geotools functionality. However Repast 3.1 .NET does not yet support GIS (no anl.repast.gis libraries therefore saving and creating shapefiles is also made slightly trickier) and no C# interface for Agent Analyst. You can write your own classes for GIS functionality in Repast.NET choosing any ESRI (MapObjects, ArcEngine etc) or other available .NET vector representation tool. For topologic calculations you can use either Geotools.NET or any ESRI product. However this is for the keen programmer who does not want to use Java.

Spaces in Repast

Space plays an important role with regard to simulation modelling especially in social sciences. Space has two purposes within simulation models, one to contain a collection of agents (e.g. the world). Secondly to define spatial relationships of agents relative to each other (A classic example would be of Conway’s Life Model) Repast offers the user 3 different types of space: cellular, GIS vector and network. I don’t know much about network space (apart from nodes, edges etc) so will focus on the other two: Cellular and GIS vector space.

Cellular Space within Repast

Repast has built in functions for Cellular Space which allows the user to use Repasts standard displays. With Repast the user has the choice of two boundaries that of a normal grid or Torus (allows rap- around). The cell’s shape can be either Regular (i.e. square) or hexagonal (sometimes used in pedestrian modelling). Cell's can contain one object or a collection of agents

Cellular space also includes Raster Space (inbuilt functions for reading ASCII & .pgm files) see the Repast GIS Model or Dan Browns Sluce Model for more information on raster space. For more information on Cellular Automata check this working paper out: How Cellular Models of Urban Systems Work. (1. Theory) by Paul Torrens and another good paper on CA is: Examples in Cellular Models of Urban Systems by David O’Sullivan Paul Torrens. For more information on Cellular space within Repast visit the Spaces Overview section on the Repast website


Vector GIS in Repast

More complicated (as it has its own set of specific packages) but highly adaptable. Agents can either be: Points (Generic agent in Repast talk) or Polygons (Vector agent). The difference being vector agents are static (i.e. don’t move) but do provide detailed boundaries. Both can be combined, like in the work I am doing.

Unlike cellular space the use of vector space needs its own displays e.g.: ESRI or OpenMap. However one can use other Java Displays (e.g. OpenJump) but more programming effort is needed. Check out my next post for a more detailed description of Vector GIS within Repast. For more detailed information on GIS integration with Repast, see the Repast: How to use GIS data with Repast webpage

From using Repast, it appears that for fast simulations, it is better to use cellular space also cellular space in my opinion is easier to code however there are many limitations with using it when trying to represent objects. For example agents are a fixed shape or size, can only move in certain ways etc.