RepastPy

RepastPy is a a rapid application development environment for Repast simulations. Using RepastPy you can visually construct a simulation out of component pieces and specifiy the behavoir of that simulation using a special subset of the Python computer language.

  Running RepastPy

RepastPy is a java application and requires Java version 1.4.2 or later. You can get the latest version of Java from here (http://java.sun.com/j2se/downloads.html)

If you've installed RepastPy using the automatic installer, you should be able to run RepastPy via a start menu item or the installer created exectuable. If you installed RepastPy manually from a zip or tar.gz file, and you are on an operating system that supports clickable executable jars (windows, for example), then you can double click on the repastpy.jar in the RepastPy install directory.

If you installed RepastPy manually from a zip or tar.gz file, your operating system does not support executable jars (Linux for example) or wish to start RepastPy from the command line, you can start RepastPy using the repastpy.sh or repastpy.bat files. If you wish to place the repastpy.sh or repastpy.bat files in your path and thus run RepastPy wherever then you will need to update the REPASTPY_LIB variable in .sh/.bat files to point the absolute location of your repastpy lib directory.

  Getting Started

RepastPy comes useful help and tutorial documentation. The help is available via the help menu item in RepastPy itself, or from here. The three tutorials are also available via the help menu item and from here. In addition, RepastPy comes with sample projects located in the projects directory.

To get started with RepastPy it is recommended that you use the on-line help to familiarize yourself with RepastPy and its layout. At that point, you should be ready to work your way through the tutorials.

Lastly, any questions about RepastPy can be directed to the repast mailing list.

  Integrating with ArcGIS

These are instructions for installing the Repast Tools Arc Toolbox. This adds an extra level of integration with ArcGIS such that you can use RepastPy from within ArcMap. It is NOT necessary for the normal operation of RepastPy.

Note that when RepastPy is used from within ArcMap it is called Agent Analyst and its load and save behavior function more consistently with Arc analyst type tools.

To install the Repast Tools Arc Toolbox:

  1. Create an AGENT_ANALYST environment variable. To do this on windows 2000: start->settings->control panel->System->Advanced-> Environment Variables->User Variables->New. The variable name should be AGENT_ANALYST (note the upper case) and the value should be wherever you installed RepastPy (e.g. C:\Program Files\repastpy)

  2. Run the registerAgent_Analyst.bat batch file. This file is in the directory where you installed RepastPy.

  3. Start ArcMap.

  4. Load your map(s).

  5. Add the repast toolbox.

  6. Save to a mxd file.

  7. Close ArcMap.

  8. Double click on the mxd file to start arc map and load the file.

    Currently, the repast toolbox only seems to work if you start ArcMap from an .mxd file, and that's the reason for the somewhat convoluted steps 3 - 8.

  9. At this point you can create new Agent Analyst models by right clicking on the Repast Tools toolbox -> New -> Agent Analyst Tool.

  10. When you create a Tool, Agent Analyst will appear and a corresponding model will be created within Agent Analyst. You can then code your model as normal.

  11. If you right click on your Tool (that is your agent analyst model) from within ArcMap, and choose Edit, you can then edit the saved model.

  12. If you right click on your Tool (that is your agent analyst model) from within ArcMap, and choose Open, this will run the model. You are given the opportunity to set the parameters for that model. These parameters correspond to fields in the model that you have marked as "parameters."