Simulation/modeling (s/m) systems for agent-based modeling

Navigation:  Geocomputational methods and modeling > Geosimulation >

Simulation/modeling (s/m) systems for agent-based modeling

Previous pageReturn to chapter overviewNext page

Although there are many systems available for developing agent-based models, we have selected eight for review, separated into three categories of licensing policy:

open source (SWARM, MASON and Repast)
shareware/freeware (StarLogo, NetLogo and OBEUS), and
proprietary systems (AgentSheets and AnyLogic).

These systems were chosen because they largely or wholly fulfilled the criteria that they are: maintained and still being developed; widely used and supported by a strong user community; accompanied by a variety of demonstration models and in some instances the model’s programming script or source code is available; and finally they are capable of developing spatially explicit models, possibly via the integration of GIS functionality.

Table 8‑3, Table 8‑4 and Table 8‑5 summarize information relating to each system for comparison purposes, categorized by their licensing policy. These tables have been adapted from the work of Najlis et al. (2001) and Parker (2001). The remainder of this subsection provides further information about each system, identifying examples of geospatial models that have been developed with the system. A caveat must be noted at this point ― the information provided within this subsection aims to be accurate and up-to-date. However, the systems reviewed are constantly being updated, thus modelers are advised to check each system’s website to obtain the latest information.

Table 8‑3 Comparison of open source simulation/modeling toolkits

 

SWARM

MASON

Repast

Developers

Santa Fe Institute/SWARM Development Group, USA

Center for Social Complexity, George Mason University, USA

University of Chicago, Department of Social Science Research Computing, USA

Date of Inception

1996

2003

2000

Website

http://www.swarm.org

http://cs.gmu.edu/~eclab/projects/mason

http://repast.sourceforge.net

Language

Objective-C/Java

Java

Java/Python/Microsoft.Net

Operating System

Windows, UNIX, Linux, Mac OSX

Windows, UNIX, Linux, Mac OSX

Windows, UNIX, Linux, Mac OSX

Required programming experience

Strong

Strong

Strong

Integrated GIS functionality

Yes (e.g. Kenge GIS library for Raster data: http://www.gis.usu.edu/swarm)

None

Yes (e.g. OpenMap, Java Topology Suite, and GeoTools). Repast simulations can also be run within ArcGIS through an extension called Agent Analyst (see below).

Integrated charting/graphing/ statistics

Yes (e.g. R and S-plus statistical packages)

None

Yes (e.g. Colt statistical package, and basic Repast functionality for simple network statistics). In RepastS there are automated connections to R and VisAD

Availability of demonstration models

Yes

Yes

Yes

Source code of demonstration models

Yes

Yes

Yes

Tutorials/’how-to’ Documentation

Yes

Yes

Yes

Additional information

Minar et al. (1996)

Contributed user example models: http://www.swarm.org/index.php/Swarm:_contributed_code

Luke et al. (2004)

Agent Analyst Extension: http://resources.arcgis.com/en/help/agent-analyst/

Useful weblogs: http://www.gisagents.blogspot.com/

http://crimesim.blogspot.com/

Table 8‑3 summarizes information for three selected open source toolkits, SWARM, MASON and Repast. Each is described below:

SWARM: Designed specifically for the development of multi-agent simulations of complex adaptive systems (although agent-based models can easily be developed using SWARM as well). Inspired by research into artificial life, SWARM was designed to study biological systems, and attempts to replicate mechanisms observable in biological phenomena. In addition to modeling biological systems, SWARM has been used to develop models for anthropological, computer science, ecological, economic, geographical, and political science purposes. Examples of spatially explicit models include: the simulation of pedestrians in the urban centers (Schelhorn et al., 1999 and Haklay et al., 2001); and the examination of crowd congestion at London’s Notting Hill carnival (Batty et al., 2003) highlighted in Figure 8‑7. Najlis et al. (2001) identify the difficulty of learning to use SWARM as a significant factor to consider before choosing this system to develop an agent-based model, although this should be less of a problem for a modeler with strong programming skills.

Figure 8‑7 Geometric and Locational Features of the Notting Hill Carnival Swarm model

clip0400

clip0401

Source: Batty et al. (2003)

MASON: Multi Agent Simulation Of Neighborhood, was developed by the Evolutionary Computation Laboratory (ECLab) and the Center for Social Complexity at George Mason University. At present MASON does not provide functionality for dynamically charting model output (e.g. histograms, line graphs, pie charts, etc.) during a simulation, or allow GIS data to be imported/exported (Luke et al., 2004). However, the developers of MASON are continuing to develop further functionality, and they hope users will develop and contribute tools themselves (e.g. GIS integration). Unfortunately there is little technical documentation and a relatively small user group in comparison to some of the other systems identified within this Guide. However, ‘how-to’ documentation, demonstration models (e.g. simple network models; the seminal ‘heatbugs’ example implemented in many toolkits, see Figure 8‑2), and several publications detailing the implementation and/or application of MASON are available for a prospective modeler to evaluate the system further.

Repast: Originally developed at the University of Chicago, the Recursive Porous Agent Simulation Toolkit (Repast) is currently maintained by Argonne National Laboratory and managed by the Repast Organization for Architecture and Development (ROAD: http://repast.sourceforge.net). Repast caters for the implementation of models in three programming languages: Python (RepastPy); Java (RepastJ and Repast Simphony); and Microsoft.Net (Repast.Net). RepastPy allows basic models to be developed by modelers with limited programming experience via a ‘point-and-click’ GUI (Collier and North, 2005). RepastPy models can subsequently be exported/ converted into Java for further development in RepastJ. Repast.Net and RepastJ allow for more advanced models to be developed, because more complex functionality can be programmed into a model. RepastPy and RepastJ are the only two open source s/m toolkits that allow the development of both raster and vector agent-based models.

Whilst still being maintained, RepastJ, Repast.NET and RepastPy have now reached maturity and are no longer being developed. They have been superseded by Repast Simphony (RepastS) which provides all the core functionality of RepastJ or Repast.NET, although limited to implementation in Java. RepastS was initially released in late 2006 and now provides the same GIS functionality of previous versions. The main improvements with RepastS over Repast 3.0 is a new optional GUI point-and-click environment for model development that generates Java classes as highlighted in Figure 8‑8A; however, models can still be coded manually. Secondly an improved runtime GUI: the GUI can now be used to build displays (both in 2 and 3D); charts; output data; interrogate agents; and interface with other programs (like R for statistics or Weka for data mining) via a point-and-click interface at run time. This means that these tasks are done more quickly after the model has been built and compiled, and do not feature in the underlying code at all, unlike previous Repast implementations.

The Repast development team have provided a series of articles regarding RepastS. The architecture and core functionality are introduced by North et al. (2005a), and the development environment is discussed by Howe et al. (2006). The storage, display and behavior/interaction of agents, as well as features for data analysis and presentation of models within RepastS are outlined by North et al. (2005b). Tatara et al. (2006) provide a detailed discussion outlining how to develop a “simple wolf-sheep predation” model which illustrates RepastS modeling capabilities, specifically its ability to create and display 2 and 3D agent-based models. In relation to the integration of GIS functionality the reader is referred to the tutorials by Malleson (2008) which demonstrates how to create a virtual city via the importation of shapefiles, create agents and then move the agents around a road network as shown in Figure 8‑9. Furthermore, within RepastS it is possible to embed spatially explicit agent-based models directly into a 3D GIS display. For this RepastS provides methods to directly visualise agent-based models to NASA’s virtual globe (Worldwind) as illustrated in Figure 8‑10. This new interactive 3D GIS display allows one to visualise agents with satellite imagery, elevated terrain and other scientific datasets. Agent Analyst (Table 8‑3, Repast entry) is an ABM extension that allows users to create, edit, and run RepastJ and RepastPy models from within ArcGIS (Redlands Institute, 2006). Repast has a relatively large user group and an actively supported e-mail list, as well as extensive ‘how-to’ documentation and demonstration models available from the system website. Useful examples of spatially explicit models created using Repast include the studying of segregation, residential and commercial location (Crooks, 2007) and the evacuation of pedestrians from within an underground station (Castle, 2007). However with the advent of 3D modeling capabilities it may be possible to model 3D problems such as air traffic, gas dispersion or more realistic pedestrian evacuation using line of sight analysis.

Figure 8‑8A RepastS point and click modeling and runtime environments

A. Visual modeling: RepastS agent editor — creation of an agent task and its linkage with behavior

clip0402.zoom80

Figure 8‑8B RepastS point and click modeling and runtime environments

B. Visual execution — the runtime displays in 2D and 3D visualization of networks

clip0403.zoom78

Figure 8‑9 RepastCity — importing GIS network data into Repast Simphony

clip0404.zoom60

Figure 8‑10 Repast Simphony — agent-based model visualized using NASA’s Worldwind

clip0405.zoom93

Table 8‑4 Comparison of shareware/freeware simulation/modeling systems

 

StarLogo

NetLogo

OBEUS

Developers

Media Laboratory, Massachusetts Institute of Technology, USA

Center for Connected Learning and Computer-Based Modeling, Northwestern University, USA

Environmental Simulation Laboratory, Tel Aviv University, Israel

Date of Inception

Early 1990s, Java based version 2000

1999

Early 2000s

Website

http://education.mit.edu/starlogo

http://ccl.northwestern.edu/netlogo

 

Implementation Language

Proprietary scripting

Proprietary scripting

Microsoft.Net

Operating System

Windows, UNIX, Linux, Mac OSX

Windows, UNIX, Linux, Mac OSX

Windows

Required programming experience

Basic

Basic

Moderate-Strong

Integrated GIS functionality

None

Yes

Yes

Integrated charting/graphing/statistics

Yes

Yes

Unknown

Availability of demonstration models

Yes

Yes

Unknown

Source code of demonstration models

Yes

Yes

Unknown

Tutorials/’how-to’ Documentation

Yes

Yes

Yes

Additional information

OpenStarLogo website: http://education.mit.edu/openstarlogo/

http://groups.yahoo.com/group/netlogo-users

http://ccl.northwestern.edu/netlogo/docs/gis.html

Geosimulation website:

http://www.geosimulation.org

Table 8‑4 summarizes information for three selected shareware/freeware toolkits, StarLogo, NetLogo and OBEUS, each of which is described below.

StarLogo: is a modeling system developed at the Media Laboratory, Massachusetts Institute of Technology (MIT). Unlike the other six agent-based s/m systems discussed in this section, both StarLogo and NetLogo models are programmed procedurally, as opposed to having an object-oriented structure. Thus, models developed with StarLogo do not benefit from the similarity in abstraction shared between the agent-based and object-oriented paradigms. Furthermore, StarLogo lacks the same flexibility offered by open source systems, since modelers are constrained to the functionality provided by the system.

StarLogo has recently undergone some important changes. The original StarLogo modeling system has been released as an open source project (see OpenStarLogo) however, it is included in this section because the new version, StarLogo TNG (The New Generation) is still shareware/freeware. StarLogo TNG moves StarLogo from the 2D to the 3D realm through the use of the OpenGL graphics API and aims to lower the barrier for programming agent-based models through the use of a drag and drop programming graphical interface. Modelers can drag commands from a set of model building blocks (a block based graphical language) rather than creating models using the StarLogo syntax as highlighted in Figure 8‑11 (upper image) thus allowing for rapid model development. StarLogo TNG uses OpenGL for displaying the models at run time therefore providing a 3D display termed ‘SpaceLand’ as show in Figure 8‑11 (lower image). The terrain within such models is editable and can be manually shaped. Agents can also be programmed to move in x, y and z directions. StarLogo is very easy to use, notably for people with very little programming experience. Dynamic charting of model output during a simulation is provided. In addition, a number of demonstration models and detailed ‘how-to’ documentation relating to these models is supplied with StarLogo, and many more are available to download from the website. Batty et al. (1998) have used StarLogo to examine visitor movement within London’s Tate Gallery, examining how changes in room configuration can affect visitor movement between exhibits.

NetLogo: originally named StarLogoT, is a variant of StarLogo, originally developed at the Center for Connected Learning and Computer-Based Modeling at Northwestern University. The critical distinction between the two s/m systems is that NetLogo is specifically designed for the deployment of models over the Internet. Initially both NetLogo and StarLogo only provided functionality to import image files, which can be used to define the environments within which agents are located, thus facilitating the development of spatial models. However, within NetLogo it is now possible to import both raster (in the form of .asc files) and vector data (shapefiles). This new ability opens up a range of possibilities for the easy creation of spatial agent based models, e.g. surface erosion modeling.

Using GIS data and NetLogo code it is possible to compute the slope and aspect of the terrain surface using elevation data and then simulate raindrops flowing over that surface by having agents constantly reorient themselves in the direction of the aspect while moving forward at a constant rate. Such functionality potentially lowers the barrier between coupling agent-based models and GIS to non- expert programmers. For example, the gradient example presented above could be used to model a process that relies on cost surfaces such as emergency evacuation of buildings (Crooks et al., 2008a). As with StarLogo TNG, models within NetLogo can be viewed in a 3D environment however unlike StarLogo TNG it is only the agents that appear in 3D while the surface remains a 2D plane. NetLogo has been used to develop applications in disciplines varying from biology and physics to the social sciences. Extensive ‘how-to’ documentation, tutorials and demonstration models are available from the system website, and functionality can be extended through Application Programming Interfaces (APIs), although the source code for the system is currently unavailable.

Figure 8‑11 StarLogo TNG drag and drop programming interface and 3D view of a simulation

clip0406

clip0407

OBEUS: Object-Based Environment for Urban Simulation, was developed at Tel Aviv University, Israel. Based on the theory of Geographic Automata Systems (GAS; Benenson and Torrens, 2004 and further elaborated on with relation to OBEUS by Benenson et al., 2006), it is designed for the simulation of urban phenomena; specifically in a geospatial context. GAS considers an urban system as consisting of objects that are either fixed (e.g. houses or roads) or non-fixed (e.g. people or cars). OBEUS is implemented in the Microsoft.NET framework, but relies on several third-party components (Microsoft.NET Framework, Borland C# compiler, etc.), which must be installed in order to operate the system. OBEUS provides a GUI to develop the structure of a model, although the behavior and interaction rules of agents must be programmed using one of the Microsoft.NET languages (e.g. C#, C++, or Visual Basic, etc.). Consequently, moderate to strong programming skills are required. OBEUS has been used to develop a number of spatially explicit models, including the simulation of ethnic residential distributions within the Yaffo area of Tel Aviv between 1955 and 1995 (Benenson et al., 2002, Benenson et al., 2005), and street parking and urban sprawl (Benenson et al., 2004). Figure 8‑12 shows a Schelling-type residential dynamics model programmed in OBEUS, including an abstract grid and real-world versions demonstrating its main output windows (maps, charts and trace window).

Figure 8‑12 Outputs from OBEUS: Schelling residential dynamics model

clip0408

Source: Benenson (2009)

Table 8‑5 Comparison of proprietary simulation/modeling systems

 

AgentSheets

AnyLogic

Developers

AgentSheets Inc., USA

XJ Technologies, Russia

Date of Inception

1991

Unknown

Website

http://www.agentsheets.com

http://www.xjtek.com

E-mail List

None

None

Implementation Language

Proprietary scripting

Proprietary scripting

Operating System

Windows, UNIX, Linux, Mac OSX

Windows, UNIX, Linux, Mac OSX

Required programming experience

None ― Basic

Moderate

Integrated GIS functionality

None

None

Integrated charting/graphing/ statistics

Yes

Yes

Availability of demonstration models

Yes

Yes

Source code of demonstration models

N /A

N /A

Tutorials/’how-to’ Documentation

Yes

Yes

Additional information

Carvalho (2000), Repenning et al. (2000) and Repenning and Ioannidou (2004).

http://www.xjtek.com/support/forum/

Parinov (2007).

Table 8‑5 summarizes information for two proprietary toolkits, AgentSheets and AnyLogic, each of which is described in more detail below. As with many other commercial software products, both have much functionality and ongoing development that cannot be adequately described here, and readers are recommended to visit the web sites for the products to obtain more details and examples.

AgentSheets is a proprietary s/m system that allows modelers with limited programming experience to develop an agent-based model, because models are developed through a GUI (Repenning et al., 2000). A number of demonstration models are available from the system website. For example, Sustainopolis is a simulation analogous to the computer game SimCity that allows investigation of pollution dispersal within a city. Furthermore, AgentSheets can be linked to real time information over the Internet (Repenning and Ioannidou, 2004).

For example, in Figure 8‑13 AgentSheets is used in conjunction with real time weather feeds and used to make mountain biking recommendations in Boulder County, Colorado. Within the model, agents represent locations that are possible candidates for biking featuring real time web accessible weather sensors. This information is then used by the biker to reach a decision on where to go biking.

Figure 8‑13 AgentSheets: The Boulder Mountain Biking Advisor

clip0409

Carvalho (2000) has used AgentSheets extensively to teach undergraduate students. He comments that it is easy to use the system to develop models quickly and provides students with hands-on experience of ABM without the need to learn a programming language. However, he also found that models created with AgentSheets were limited in their sophistication (notably in terms of the complexity of representation of agent behavior and interaction). Furthermore, agents are limited to movement within a two-dimensional cell-based environment.

AnyLogic is a more sophisticated offering that incorporates a range of functionality for the development of agent-based models. For example, models can dynamically read and write data to spreadsheets or databases during a simulation run, as well as dynamically chart model output. Furthermore, external programs can be initiated from within an AnyLogic model for dynamic communication of information, and vice versa. However, AnyLogic models can only be created on Microsoft operating systems, although a simulation can be run on any Java-enabled operating system once compiled (e.g. a Macintosh operating system). The AnyLogic website notes that models have been developed for a diverse range of applications including: the study of social, urban and ecosystem dynamics (e.g. a predator-prey system); planning of healthcare schemes (e.g. the impact of safe syringe usage on HIV diffusion); computer and telecommunication networks (e.g. the placement of cellular phone base stations); and the location of emergency services and call centers.

Further information pertaining to AnyLogic modeling applications can be found in Parinov (2007); these include imitating the functioning of a emergency department in a large hospital. However, the source code of these examples and/or documentation of these models is not available. Makarov et al. (2008) has used AnyLogic to study traffic jams in Moscow' and explore different scenarios for reducing such events either by road pricing or new road building.

The example illustrated in Figure 8‑14 seeks to predict transport load and housing allocation (up to March 2009) within a city comprised of 5 independent zones. Each zone contains housing and business units, with various qualities of habitation and roads. Households may contain multiple members, who may work at various enterprises. Households can move in and out of the city, merge or separate, and even relocate to different zones (with an impact on travel patterns). Household members can change jobs when current ones become unsatisfactory (e.g. because of high living costs or low pay). Households whose prosperity improves may seek a better location to live within the city, which in turn may require them to purchase cars, resulting in raised CO2 emissions.

Figure 8‑14 An urban and transport dynamics model developed in AnyLogic (2006)

clip0410.zoom80

Source: http://www.xjtek.com/anylogic/demo_models/