Showing posts with label Agent Analyst. Show all posts
Showing posts with label Agent Analyst. Show all posts

Friday, May 21, 2010

Agent Analyst Bird Migration Model

While I have blogged about Agent Analyst before (see here), the Redlands Institute have created some movies showing a simulation of bird migration patterns. While the exact details are not abundant, it appears they where developed to learn and demonstrate concepts relating to linking agent-based models with a GIS. Specifically using the Agent Analyst toolkit with Tracking Analyst in ArcMap (as shown in the movie below):


While this movie shows a live model run:


Finally the movie below shows how one can visualize the results in ESRI's ArcGlobe.



More movies from the Redlands Institute on YouTube can be found here.

Friday, May 22, 2009

Agent Analyst movies

Agent Analyst is an Agent-based modelling extension that allows users to create, edit, and run RepastJ and RepastPy models from within ArcGIS. The Agent Analyst toolkit was developed by Argonne National Laboratory’s Center for Complex Adaptive Agent Systems Simulation in collaboration with ESRI and to promote cooperation and collaboration between GIS professionals and agent-based modellers

While its been around for some time, I have recently just come across two videos from the Redlands Institute, however the actual models and further details is limited, they show the potential of the extension for agent-based modelling. The first demonstrates the integration of Agent Analyst and Tracking Analyst within ArcGIS Desktop. Specifically the model shows a simulation of bird migration patterns of 2 species. The second model uses Agent Analyst to compare two urban growth scenarios.




Bird migration patterns



Comparing two urban growth scenarios

For more information including tutorials on how to use Agent-Analyst see the Agent Analyst website.


Thursday, October 11, 2007

Open Source Simulation / Modelling Systems for ABM

Note: This post is now dated and MASON and Repast has changed considerably since this was written. A new post will soon be written (14th July 2010) but in the meantime please see the comments below.
This blog has tended to focus on Repast when developing agent-based models as it is the toolkit we most often use to create such models. However, we felt it was time to highlight other open source Simulation/Modelling Systems that allow for the creation of geospatial agent-based models. These include Swarm and MASON. A comparison of Repast, Swam and Mason can be seen in the table below (adapted from Najlis et al., 2001 and Parker, 2001a). The reminder of this post provides further information about each system, identifying examples of geospatial agent-based models that have been developed with these systems. Please feel free to comment on these systems and to highlight other geospatial models developed with these systems.


Swarm is an open source simulation/modelling system designed specifically for the development of multi-agent simulations of complex adaptive systems (Swarm, 2006); although agent-based models can easily be developed using Swarm as well. Originally developed in Objective-C, Swarm is also now available in Java (a Java layer running on top of the Swarm kernel). Inspired by Artificial Life, Swarm was designed to study biological systems, attempting to infer mechanisms observable in biological phenomena (Minar et al., 1996). In addition to modelling biological systems, Swarm has been used to develop models for anthropological, computer science, ecological, economic, geographical, and political science purposes. Useful examples of spatially explicit models include: the simulation of pedestrians in the urban centres (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). Najlis et al. (2001) identify the steep learning curve of 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 modeller with strong programming skills. Many of the other toolkits take their inspiration from Swarm (such as Repast and Ascape (Parker, 2001b)).

MASON (Multi Agent Simulation Of Neighbourhood) was developed by the Evolutionary Computation Laboratory (ECLab) and the Centre for Social Complexity at George Mason University. At present MASON does not provide functionality for dynamically charting (e.g. histograms, line graphs, pie charts, etc) model output 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 utilising Java libraries such as GeoTools). Unfortunately there is little technical documentation and a relatively small user group in comparison to some of the other systems identified within this paper. However, how-to documentation, demonstration models (e.g. the seminal heat bugs example, network models, etc), and several publications detailing the implementation and/or application of MASON are available for a prospective modeller to evaluate the system further (MASON, 2006).


Repast (Recursive Porous Agent Simulation Toolkit) was originally developed at the University of Chicago, and is currently maintained by Argonne National Laboratory and managed by the Repast Organisation for Architecture and Development (ROAD). Repast caters for the implementation of models in three programming languages: Python (RepastPy); Java (RepastJ RepastS); and any programming language compatible with the Microsoft.NET framework, for example, C# (Repast.NET). RepastPy allows basic models to be developed by modellers 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 (Vos, 2005) because more complex functionality can be programmed into a model. Agent Analyst is an ABM extension that allows users to create, edit, and run Repast 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, and residential and firm location (Crooks, 2006), and the evacuation of pedestrians from within an underground station (Castle, 2006). Further discussion of Repast can be seen in Crooks, 2007.
To read more about the comparison of different Simulation / Modelling Systems for the creation of geospatial agent-based models check out our working paper ‘Principles and Concepts of Agent-Based Modelling for Developing Geospatial Simulations’.

References
Batty, M., Desyllas, J. and Duxbury, E. (2003), 'Safety in Numbers? Modelling Crowds and Designing Control for the Notting Hill Carnival', Urban Studies, 40(8): 1573-1590.
Castle, C.E. (2006), 'Using Repast to Develop a Prototype Agent-Based Pedestrian Evacuation Model', Proceedings of the Agent 2006 Conference on Social Agents: Results and Prospects, Chicago, USA.
Castle, C.J.E. and Crooks, A.T. (2006), Principles and Concepts of Agent-Based Modelling for Developing Geospatial Simulations, Centre for Advanced Spatial Analysis (University College London): Working Paper 110, London, England.
Collier, N. and North, M.J. (2005), 'Repast for Python Scripting', Annual Conference of the North American Association for Computational Social and Organizational Science (NAACSOS) Notre Dame, Indiana, USA.
Crooks, A.T. (2007), The Repast Simulation/Modelling System for Geospatial Simulation, Centre for Advanced Spatial Analysis (University College London): Working Paper 123, London, UK.
Crooks, A.T. (2006), 'Exploring Cities using Agent-Based Models and GIS', Proceedings of the Agent 2006 Conference on Social Agents: Results and Prospects, Chicago, USA.
Haklay, M., O'Sullivan, D., Thurstain-Goodwin, M. and Schelhorn, T. (2001), '"So Go Downtown": Simulating Pedestrian Movement in Town Centres', Environment and Planning B: Planning and Design, 28(3): 343-359.
Luke, S., Cioffi-Revilla, C., Panait, L. and Sullivan, K. (2004), 'MASON: A New Multi-Agent Simulation Toolkit', SwarmFest 2004, Eighth Annual Swarm Users/Researchers Conference., University of Michigan, Ann Arbor, Michigan USA.
MASON (2006), Multi Agent Simulation Of Neighbourhood, Available at http://cs.gmu.edu/~eclab/projects/mason
Minar, N., Burkhart, R., Langton, C. and Askenazi, M. (1996), The Swarm Simulation System: A Toolkit for Building Multi-agent Simulations, Available at http://www.santafe.edu/projects/swarm/overview/overview.html [Accessed on August 8th, 2006].
Najlis, R., Janssen, M.A. and Parker, D.C. (2001), 'Software Tools and Communication Issues', in Parker, D.C., Berger, T. and Manson, S.M. (eds.), Meeting the Challenge of Complexity: Proceedings of a Special Workshop on Land-Use/Land-Cover Change, Irvine, California.
Parker, D.C. (2001a), Object-Orientated Packages for Agent-Based Modelling, Available at http://mason.gmu.edu/~dparker3/spat_abm/lectures/lecture2_tables.pdf
Parker, M. (2001b), 'What is Ascape and Why Should You Care?' Journal of Artificial Societies and Social Simulation, 4(1): http://jasss.soc.surrey.ac.uk/4/1/5.html.
Redlands Institute (2006), What is Agent Analyst?, Available at http://www.institute.redlands.edu/agentanalyst/AgentAnalyst.html
Schelhorn, T., O'Sullivan, D., Hakley, M. and Thurstain-Goodwin, M. (1999), STREETS: An Agent-Based Pedestrian Model, Centre for Advanced Spatial Analysis (University College London): Working Paper 9, London.
Swarm (2006), Swarm: a platform for agent-based models, Available at http://www.swarm.org/

Friday, February 16, 2007

Repast Implementation Languages

This is a more detailed follow up on a previous post ‘Strands of Repast’ outlining the implementation languages of Repast and a list of relevant references if you want to know more.

Repast Implementation Languages

Repast is a derivative of the Swarm simulation toolkit. Initially conceived as a library of Java classes that could interface with the Swarm simulation framework, this concept was abandoned when, amongst other reasons, a Java implementation version of Swarm was released (Collier, 2002). Consequently, the creators of Repast developed an independent framework completely written in Java, thus completely object oriented borrowing several key abstractions present within Swarm. Repast has matured considerably since its inception, with many enhancements included with every new version. However, to accommodate a growing number of researchers that were interested in developing simulations with the toolkit, Repast was developed for implementation in alternative programming languages. Currently Repast can be implemented in three different programming languages: Java (RepastJ and RepastS), Microsoft.Net (Repast.Net), and Python (RepastPy). The following four subsections will explore these further different implementations.

Python - RepastPy

RepastPy is useful for rapidly developing a basic ABM, offering the most graphical way to create a model via a point-and-click graphical user interface (GUI) (Figure 1). Thus allowing modellers with limited programming experience to create basic models. Collier and North (2004; 2005) identify three model types permissible within RepastPy: 1) a GIS-based model where agents are GIS features with topology interacting within a landscape; 2) a network based model where agents are nodes in a network that can manipulate the network topology; and, a grid based model where agents with topology reside and interact. RepastPy is also the basis of Agent Analyst, an ABM extension for ArcGIS that allows users to create, edit, and run Repast models from within the GIS (Redlands Institute, 2006), although this is not a requirement for using RepastPy.

Within RepastPy, template agents can be created to populate each model type, but a user must develop behaviours for agents using a subset of the Python programming language, referred to as not quite Python (NQPython) by the Repast developers. A subset is used because the entire Python language is not necessary to develop agent behaviours. Python is particularly useful because it integrates with Java, thus permitting access to the Repast framework, as well as other extensions and packages available in the Java programming language. Furthermore, models developed in RepastPy can be exported into Java, allowing users to subsequently work with the traditional RepastJ framework. Collier and North (2004; 2005) provide a more detailed overview of the RepastPy, and how to develop a model with this implementation of Repast. Further documentation, tutorials, and demonstration models for RepastPy and Agent Analyst are available in their retrospective installation folders. The Agent Analysts website (http://www.institute.redlands.edu/agentanalyst/) also provides some useful resources.

Figure 1: RepastPy GUI.

Java - RepastJ

Object-oriented languages, such as Java, easily lend themselves to the creation of extensible frameworks through the use of inheritance and composition. Thus, Repast benefits from the extensibility offered by Java. For instance, a large library of classes originally constructed for alternative means can be used by an agent-based modeller to extend the generic Repast’s functionality. For example, the ability to import data in different formats (e.g. .shp (ESRI Vector Shapefile format) .pgm (Portable grey map image: a raster file format) and .ascii (ESRI’s grid format.) formats). Collier (2002) and North et al. (2006) provide more details about RepastJ, and how to develop a model with this implementation. ‘How-to’ documentation and demonstration models for RepastJ are available in the installation folder. Tobias and Hofmann (2004) when reviewing several Java based simulation/modelling systems, commented that the RepastJ environment was the “clear winner” with extensive technical documentation and “How to Documents” that make it easy to become familiar with the software, along with an active mailing list.

Microsoft.Net - Repast.NET

Any programming language compatible with the Microsoft.Net framework (e.g. Visual Basic.Net, C++, J#, C#, etc) can be used to develop a model with Repast.Net. The majority of core and non-core functionality within RepastJ is available in Repast .Net. However, a notable omission is GIS functionality (e.g. ESRI’s, OpenMap, etc). Vos (2005a; 2004) explains that the GIS packages available within RepastJ were not converted into C# for inclusion within Repast.Net because of both time constraints and issues with the integration of the necessary external libraries. Nevertheless, the majority of packages included within RepastJ (both native and external), were converted into C# (e.g. Colt, JGAP and OpenForecast libraries), or similar replacement libraries have been included. This continuity in packages provides a modeller with a similar development experience in Repast.NET or RepastJ. Similarly, modellers are able to leverage any Repast related knowledge they have (in Repast.NET or RepastJ) and apply it to the alternative implementation of Repast. In the majority of cases the same package names, class names, method names in RepastJ are include in Repast.NET (Vos, 2005a). Even though Repast.Net is developed in C#, the interoperability of the .NET framework does not impose any restrictions on the compatible language a modeller can use to develop a model (Vos, 2005a). Vos and North (2004) and Vos (2005b) provide more details about Repast.Net, and how to develop a model with this implementation. How-to documentation and demonstration models for Repast.Net are available in the installation folder.

Repast Simphony

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 (Version 1.5). RepastS provides a more point-and-click interface for developing certain parts of the model, for example when creating graphs thus less code needs to be written. 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 behaviour / interaction of agents, as well as features for data analysis (i.e. via the integration of the R statistics package) 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; illustrating RepastS modelling capabilities. RepastS was only released in October 2006 and therefore there is little detail about all its core functionality at present. In relation to GIS functionality, the Repast team has moved away from Agent Analyst and OpenMap towards GeoTools for the display of GIS data.

Choosing an Implementation Language?

The developers of Repast recommend basic models are created with RepastPy, due to its visual interface, and advanced models are written with RepastJ or Repast.NET (and more recently RepastS). Since RepastPy will export into Java, it provides a logical starting point for beginners to develop basic models, or more experienced users to develop an initial model for further development in Java (RepastJ). RepastJ has several advantages over the other Repast implementations. Firstly, Java is popular programming language due to its platform independence (i.e. a simulation written in RepastJ can be run on computer using several different operating system e.g. Windows™, Unix™, Linux™, Mac™, etc), opposed to a simulation written in Repast.Net. However, Weidmann and Girardin (2005) highlight the affect of running a RepastJ model on different operating system and using different Java Development Kits (JDKs). The authors concluded that while performance (execution time of program without graphical output) is very similar when using RepastJ on different operating system (tested on MS Windows XP Professional™ and Linux Fedora Core 2), the performance varies considerably when using different JDKs (i.e. more recent JDKs are more efficient). Finally, as Java is the original implementation language of Repast there considerably more demonstration models, tutorials, and help via the user community is available. Nevertheless, Repast.NET offers a range of languages in which to develop Repast models. At the time of writing, RepastS had just been released and the Repast team see it as the end goal of Repast. However there are no examples models available apart from those in the download, there is little in the way of user documentation and transforming existing RepastJ models to RepastS in the immediate future will require a substantial effort, additionally there is no GIS support.

On the GIS side, currently only RepastJ and RepastPy have direct support for the importation of GI datasets.

Any thoughts or comments please send them


References

Collier, N. (2002), RePast: An Extensible Framework for Agent Simulation, Available at http://www.econ.iastate.edu/tesfatsi/RepastTutorial.Collier.pdf [Accessed on June 16th, 2006].

Collier, N. and North, M.J. (2004), 'Repast for Python Scripting', Proceedings of the Agent 2004 Conference on Social Dynamics: Interaction, Reflexivity and Emergence, Chicago, USA, pp. 231-237, Available at http://www.agent2005.anl.gov/Agent2004.pdf.

Collier, N. and North, M.J. (2005), 'Repast for Python Scripting', Annual Conference of the North American Association for Computational Social and Organizational Science (NAACSOS) Notre Dame, Indiana, USA, Available at http://www.casos.cs.cmu.edu/events/c

Howe, T.R., Collier, N.T., North, M.J., Parker, M.T. and Vos, J.R. (2006), 'Containing Agents: Contexts, Projections, and Agents', Proceedings of Agent 2006 Conference on Social Agents: Results and Prospects, Chicago, USA.

North, M.J., Collier, N.T. and Vos, J.R. (2006), 'Experiences Creating Three Implementations of the Repast Agent Modelling Toolkit', ACM Transactions on Modelling and Computer Simulation, 16(1): 1-25.

North, M.J., Howe, T.R., Collier, N.T. and Vos, J.R. (2005a), 'The Repast Simphony Development Environment', Proceedings of the Agent 2005 Conference on Generative Social Processes, Models, and Mechanisms, Chicago, USA, Available at http://www.agent2005.anl.gov/.

North, M.J., Howe, T.R., Collier, N.T. and Vos, J.R. (2005b), 'The Repast Simphony Runtime System', Proceedings of the Agent 2005 Conference on Generative Social Processes, Models, and Mechanisms, Chicago, USA, Available at http://www.agent2005.anl.gov/2005pdf/Mysore%20et%20al.pdf.

Redlands Institute (2006), What is Agent Analyst?, Available at http://www.institute.redlands.edu/ [Accessed on May 31st, 2006].

Tatara, E., North, M.J., Howe, T.R., Collier, N.T. and Vos, J.R. (2006), 'An Introduction to Repast Simphony Modelling using a simple Predator-Prey Example', Proceedings of the Agent 2006 Conference on Social Agents: Results and Prospects, Chicago, USA.

Tobias, R. and Hofmann, C. (2004), 'Evaluation of Free Java-libraries for Social-Scientific Agent Based Simulation', Journal of Artificial Societies and Social Simulation, 7(1).

Vos, J.R. (2005a), ' Repast .NET: The Repast Framework Implemented in the .NET', Annual Conference of the North American Association for Computational Social and Organizational Science (NAACSOS) Notre Dame, Indiana, USA, Available at http://www.casos.cs.cmu.edu/events/.

Vos, J.R. (2005b), 'Repast .NET: The Repast Framework Implemented in the .NET', Annual Conference of the North American Association for Computational Social and Organizational Science (NAACSOS) Notre Dame, Indiana, USA, Available at http://www.casos.cs.cmu.edu/events.

Vos, J.R. and North, M. (2004), 'Repast .NET', Proceedings of the Agent 2004 Conference on Social Dynamics: Interaction, Reflexivity and Emergence, Chicago, IL, USA, pp. 239-254, Available at http://www.agent2005.anl.gov/Agent2004.pdf

Weidmann, N.B. and Girardin, L. (2005), 'Technical Note: Evaluating Java Development Kits for Agent-Based Modelling', Journal of Artificial Societies and Social Simulation, 8(2).

Monday, January 08, 2007

Agent-Based Modelling and Simulation using Repast: A Gallery of GIS Applications

Below is a paper that Christian and I gave at GISRUK 2006. We would like to thank all those at CASA that helped us with by providing information. The full reference is:
Castle, C.J.E., Crooks, A.T., Longley, P.A. Batty, M. (2006), 'Agent-Based Modelling and Simulation using Repast: A Gallery of GIS Applications from CASA', in Priestnall, G. and Aplin, P. (eds.), Proceedings of the 14th Geographical Information Systems Research UK Conference, The University of Nottingham, England, pp. 237-239.  (pdf)

1. Introduction

Agent-based modelling and simulation (ABMS) is a relatively new approach to modelling systems comprising of autonomous, interacting actors (i.e. agents) by computer representation. For example, in a pedestrian evacuation context, agents can include different evacuees with different physical and behavioural characteristics (e.g. adult, child, mobility impaired person, knowledge of building layout, member of staff, visitor or tourist, etc), all of whom are required to make decisions or take actions that might affect the evacuation process. By simulating individual actions of diverse agents, and measuring the resulting system behaviour and outcomes over time, ABMS can be a useful tool for studying the effects on processes that operate at multiple scales and organisational levels, and their effects (Brown, in press).

2. Agent-Based Modelling and Simulation

The development of models can be greatly facilitated by the utilisation of libraries of reusable model components. The use of pre-defined ABMS toolkits can reduce the burden modellers face, programming parts of a simulation that are not content-specific e.g. simulation control or input-output procedures (Tobias and Hofmann, 2004). It also increases the reliability and efficiency of the programs, as most of the complex parts of the program have been created and optimised by professional developers, as standardised simulation tools. Finally, modellers profit from their ease of use, most are ready made, widely distributed, provide detailed documentation and a user interface that simplifies the user’s task of creating a model. Unsurprisingly, there are limitations. For example, a substantial amount of effort is required to understand another programmer’s code, a toolkit may be written in its ‘own’ programming language (e.g. NetLogo), and the desired/required modelling functionality may not all be present (yet!). However, these can be offset against additional tools offered by the user community.

Object-Orientated Programming (OOP) is central to ABMS. However, it is not the intention of this paper to outline its concepts here. The subsequent section of this paper evaluates some of the ABMS toolkits currently available, highlighting some of the key questions that should be considered whilst determining an appropriate toolkit for a users needs.


2.1 Toolkits

Numerous ABMS toolkits have emerged, although their level of development varies considerably. Some of the more established toolkits, and therefore mainstream include: AgentSheets; AnyLogic; Ascape; Breve; Cormas; deX; ECHO; JADE; Madkit; MAGSY; MASON; MIMOSE; NetLogo; Ps-I; Quicksilver (renamed Omonia); Repast; SimAgent; SimPAck; StarLogo; Sugarscape; Swarm; TeamBots; and VSEit. Of course, comprehensive practical experience must be gained to obtain a full understanding of a modelling or simulation toolkit’s functionality in relation to a users needs. Unfortunately, this is not usually a feasible objective. For this reason several authors (Najlis et al., 2001; Tobias and Hofmann, 2004; and Roberson, 2005) discuss criteria that can, or should be considered before selecting a toolkit. These include, but are not limited to: ease of programming and/or using the package; size of the community using the platform; size of the programming community familiar with the language in which the package is implemented; the ability to represent space (object vs. field view) and topological relationships; mechanism for scheduling and sequencing events; and the ability to represent multiple organisational / hierarchical levels, or scales.

Depending on the model specification and the users programming expertise, these criteria will be weighted differently. For example, the ease of programming the model, which is affected by the programming language used by the platform, can have a considerable bearing on the platform used. According to Wood (2002) in comparison to C++, for example, Java is considerably easier to use, especially for a beginner. Although Java also incorporates some of the more modern and useful developments in OOP languages (e.g. applets, which allow models to be shared over the internet), the most compelling argument for using Java is its platform independence.

The remainder of this paper is dedicated to Repast models that have, or are being developed at the Centre for Advanced Spatial Analysis, University College London. Repast has/is been used by a number of researchers for several reasons, which are a balance of the criteria listed above. Repast provides the option of programming a model in Java, which is advantageous for the reasons outlined above. Currently there is a large and very active community using Repast, which has generated an invaluable library of example models and source code. Help is also available via the community mailing list, where responses are usually prompt (allowing for the time lag in to America) and helpful. Additionally, the list of toolkits listed above can be split into proprietary, freeware, and open source. The distinction being, unlike freeware, proprietary toolkits require a licence, but both are essentially black box. This limits the possibility to extend the toolkit when required functionality is unavailable, and the user is not entirely sure about the inner workings of their model. Conversely, open source toolkits (which includes Repast) are not only free, but they provide a modeller with the flexibility to alter or extend core functions if they do not exist, and understand how core functions are programmed and work. This provides the user with a more extensible and robust toolkit. A more detailed overview of Repast, including an outline of Repast’s functionality is provided in the subsequent section.

3. Repast

Repast provides a set of core classes for creating, running, displaying and collecting data from agent based simulations (Figure 1), that allow for complex models to be developed in a relatively short period of time (Macal and North, 2005). It seeks to support the development of extremely flexible models of agents with an emphasis of social interactions. Users can build simulations by incorporating Repast library components into their own programs depending on what functions are required. The use of these core features means that less time is given to GUI development and more time for model development.

At present Repast 3.1 offers three different programming languages in which to implement and develop Repast models: RepastPy (based on Python scripting language), RepastJ (Java based), Repast.Net (implemented in C# but can use any .Net language). All have the same core services, which allow ABMs to be developed.

One of Repast’s attractive features is its ability to integrate GIS data (either raster or vector) directly into the simulation with relative ease. GIS have been available for quite a while, but until recently has not been easily incorporated into programmes of social systems. Repast allows a user to build a ‘world’ populated by mobile entities (agents) that have their own rule sets for establishing their behaviour. Agents live in ‘spaces’ within these worlds, which are the environments they move around and interact within. Typically, the space agents occupy are simple grids (i.e. cellular or raster), or graphs with edges and nodes. However, with the integration of GIS, agents can move around ‘real space’. For example, the use of RepastJ or RepastPy provides a set of classes that allow Shapefiles to be displayed either through OpenMap or ArcGIS (via Agent Analysis).





Figure 1: Typical Repast features.


4. Applications

Repast is currently being used in a wide variety of applications from the study of land use change (Deadman, et al., 2004; Brown et al., 2005; and Xi et al., 2005), watershed modelling (Reitsma and Albrecht 2005), infectious disease modelling (Yang and Atkinson 2005), regime change (Cederman 2003), economics and business studies (North et al., 2002; Robertson 2003; and Padgett et al., 2003), to name but a few. CASA researchers have used or are using Repast (specifically RepastJ) to study a range of applications: pedestrian modelling, urban dynamics, segregation, residential and business location and evacuation modelling (Figure 2). The models use the core Repast functionality, extending it further to meet their own specific needs.

For example the CAPABLE project (Children’s Activities, Perceptions and Behaviour in the Local Environment) is based on the increasing concern about allowing children out unaccompanied by adults and at the same time increasing recognition of children's rights and autonomy. The purpose of this research is to explore how children use the local environment and what kind of environmental factors affect children’s spatial behaviour. Part of the project objective is to develop a multi-agent-based model of children’s spatial movement, as well using animation software for visualizing GPS traces. This software is written in Java using Repast and OpenMap libraries. The Ordnance Survey (OS) MasterMap™ is used as the base map, upon which GPS points are overlaid, thus allowing the creation of a time-series animation.

Barros (in press) has used Repast to study urban dynamics in Latin American cities. This research produced a series of exploratory agent-based simulation models exploring urban growth in relation to poverty and spontaneous settlements in Latin American cities where there is poor control of policies upon the development process. The models explore how these processes occur in both space and time, and how this is shaped by individual decisions.


Figure 2: Screen shots of some applications that are being developed at CASA.

Another research project at CASA involves an agent-based approach to simulating pedestrian movement and the factors that control it. Part of the model simulates rent rate, land value and land use changes in informal shopping centres. Another part of model looks at the affect of pedestrians on micro-scale land use change due to decisions that are likely to have an impact on trips’ demand and/or offer. Issues being explored include how pedestrians affect rent rates, pedestrian flows and then rent rates based on retailing theory (Zachariadis, 2005).


5. Conclusion

ABMS is a relatively new and growing approach to modelling systems comprising of autonomous, interacting agents by computer representation. Modelling can be facilitated by the use of model components that are predefined within an ABMS toolkit. This reduces the burden of programming non content-specific parts of a simulation, and increases the reliability and efficiency of the program by allowing complex parts to be created and optimised by professional developers. A non-exhaustive list of mainstream toolkits was identified, providing the reader with criteria they should consider before choosing a toolkit for their modelling requirements. Specific details of the Repast toolkit were discussed, outlining benefits in relation other toolkits. In particular, Repast is a robust and extensible toolkit that allows user to develop models tailored to their specific needs. It also has the added advantage of being open source and having a healthy support and user community. Finally, an overview of models developed at CASA using Repast was provided focusing on GIS applications.

References:
  • Barros J. (in press), Urban Dynamics in Latin American cities: An Agent Based Simulation Approach. Environment and Planning B: Planning and Design.
  • Brown, D.G. (in press), Agent Based Models. In The Earth’s Changing Land: An Encyclopaedia of Land-Use and Land-Cover Change (Westport CT: Greenwood Publishing Group).
  • Brown, D.G., Riolo R., Robinson D.T., North, M., and Rand W. (2005), Spatial Process and Data Models: Toward Integration of Agent-Based Models and GIS. Journal of Geographical Systems, Special Issue on Space-Time Information Systems 7(1), pp. 25-47.
  • Cederman, L-E. (2003), Modelling the Size of Wars: from Billiard Balls to Sand Piles, American Political Science Review, 97(1), pp. 135-150.
  • Deadman, P.J., Robinson, D.T., Moran E., Brondizio E. (2004), Effects of Colonist Household Structure on Land Use Change in the Amazon Rainforest: An Agent Based Simulation Approach. Environment and Planning B: Planning and Design 31(5), pp. 693-709.
  • Macal, C.M., and North, M. (2005), Tutorial on Agent-Based Modelling and Simulation. Proceedings of the 2005 Winter Simulation Conference. M. E. Kuhl, N. M. Steiger, F. B. Armstrong, and J. A. Joines, eds.
  • Najlis, R., Janssen M.A., and Parker D.C. (2001), Software Tools and Communication Issues. In Parker, D.C., Berger, T., and Manson, S.M., Meeting the Challenge of Complexity: Proceedings of a Special Workshop on Land-Use/Land-Cover Change (California).
  • North, M., Macal, C., Cirillo, R., Conzelmann, G., Koritarov, V., Thimmapuram, P., Veselka, T. (2002), Multi-Agent Modelling of Electricity Markets. In Proceedings of the Agent 2002 Conference on Social Agents: Ecology Exchange and Evolution pp. 215-226.
  • North, N., Collier, N., Vos, R., Najlis, R., and Maciorowski, W., (2005), Agent-Based Modeling with Agent Analyst, GeoComputation 2005.
  • Reitsma, F.E., and Albrecht, J. (2005), A New Process Data Model and its Application. Proceedings of GISUK’05 (Glasgow).
  • Robertson, D.A. (2003). Agent-Based Models of a Banking Network as an Example of a Turbulent Environment: The Deliberate vs. Emergent Strategy Debate Revisited. Emergence, 5(2), pp. 56-71.
  • Robertson, D.A. (2005). Agent-Based Modelling Toolkits: Netlogo, Repast, and Swarm, Academy of Management Learning and Education, 4(4), 525-527.
  • Padgett, J.F., Lee, D., and Collier, N. (2003), Economic production as Chemistry Industrial and Corporate Change, 12(4), pp. 843-877.
  • Tesfatsion, L., (2005), General Software and Toolkits: Agent-Based Computational Economics (ACE) and Complex Adaptive Systems (CAS), http://www.econ.iastate.edu/tesfatsi /acecode.htm.
  • Tobias, R., and Hofmann, C., (2004), Evaluation of Free Java-libraries for Social-scientific Agent Based Simulation. Journal of Artificial Societies and Social Simulation 7(1).
  • Wood, J., (2002), Java Programming for Spatial Sciences (London; Taylor and Francis).
  • Xie, Y., Batty, M., and Zhao, K. (2005), Simulating Emergent Urban Form: Desakota in China. CASA Working Paper 95.
  • Yang, Y., and Atkinson, P.M., (2005), An Integrated ABM and GIS Model of Infectious Disease Transmission. Paper 143 Computers in Urban Planning and Urban Management (CUPUM).
  • Zachariadis, V., (2005). An Agent-Based Approach to the Simulation of Pedestrian Movement and Factors that Control it. Paper 372 Computers in Urban Planning and Urban Management (CUPUM).

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.

Tuesday, February 28, 2006

Strands of Repast

There are currently three flavours/strands of Repast: RepastPy, RepastJ and Repast.Net. All have the same core services, which allow ABM to be developed on top of but they differ on their underlying platform and development languages. For all applications basic programming knowledge is needed.

RepastPy
RepastPy is the most graphical way to create models via GUI and Python scripting language (platform independent). It was designed for rapid development and prototyping of basic models and to learn the Repast framework (Possibly could be described like Repasts equivalent of NetLogo.) If more complex models are required after using RepastPy, models can easily be exported to Java if more complex models are desired. When a simulation is initiated in RepastPy, the familiar Repast GUI opens to allow dynamic access to simulation and agent parameters. It appears that RepastPy is the basis of Agent Analyst.
 
RepastJ
RepastJ Is the Java based strand of Repast (therefore it is platform independent therefore models created with this are extremely portable). RepastJ contains an extensive list of core classes (including GIS functionality). Unlike RepastPy you need to use an IDE (such as Eclipse or netBeans) to write, edit, compile and debug your programs. Once a model is written and compiled in RepastJ it run on any computer with JVM. Most models, it appears are being developed in RepastJ.

Repast.Net
Repast.Net is implemented in C# (Microsoft's answer to Java). Repast simulations can be implemented in any .Net language (VB.Net, C++, J#, C#, etc. ) and integrated to create Windows-based applications. Unlike RepastJ, at present there are no inbuilt GIS functions therefore need to link (e.g. ESRI MapObjects). Nor is Repast.Net platform independent. It’s good if you don’t want to know Java but still want to use Repast.

Which one to use? It’s up to you. If you want your Repast models to be portable you may need to use Java. RepastJ and RepastPy both have inbuilt GIS classes unlike the current .NET version. Most people appear to be using the Java version and I can’t find many examples of people using the .NET version (but in theory the .NET version should be faster than Java)