Ascape 1.9.1 ReadMe and Notes

Ascape 1.9.1

October 12, 2000 [new installer]



Contents

  • Introduction
  • Imporant Information - Copyright, etc.
  • Installation - Instructions for putting Ascape on your machine.
  • Getting Started - What to do after installing Ascape.
  • Known Issues - Any outstanding problems that you should be aware of.
  • Acknowledgements
  • Contact Information
  • Version History - Even if you have used Ascape before, please take a look at the version information to find out about new features.
  • Updating from Previous Versions - Help with converting your older models. If it won't build, look here.
  • Introduction

    Ascape is a research tool developed at Brookings to support agent based research. It is designed to be flexible and powerful, but also approachable, easy to use and expressive. A high-level framework supports complex model design, while end-user tools make it possible for non-programmers to explore many aspects of model dynamics. It is written entirely in Java, and should run on any Java-enabled platform. Models developed within it can be easily published to the web for use with common web browsers. It is hoped that Ascape provides a strong contribution to exploring and sharing the many important insights agent-based models offer.

    Important Information

    Ascape is copyright 1998-2000, The Brookings Institution. This software may be used without fee for non-commercial purposes. If you would like to redistribute Ascape, or have other licensing concerns, please contact us. KLGroup's JCChart is included only to support the Ascape charting classes, and should not be used for any other purpose unless you have your own JCChart license. The heatbugs code in the edu.brooksantafe hierarchy is based in part on code developed by Swarm.org, and so is covered by the GNU Public license; please see the file 'copying' in that directory for more information. Toolbar icons are freely available, and are (C)1998 Dean S. Jones (dean@gallant.com www.gallant.com/icons.htm)

    While we try to limit uneccessary modifications, Ascape is research oriented software; apis, distribution, and features may change over time.

    Direct support is not provided; mailing lists provide a better forum for sharing information and make the most efficient use of limited resources. We strongly welcome and encourage your feedback, positive and negative. User contributions, ideas, and feature requests are also most welcome. Please let us know what works and makes sense, and what doesn't. For support, comments, or discussion of technical and general modeling issues, please join the Ascape mailing list. (See below.) We'll do our best to respond to any messages to this list.

    Installation

    Ascape is delivered with an installer, which should make the installation process completely straightforward. The latest installers are located here.

    If you do not have a Java VM installed, install the "includes Java VM" option. (Or just select the 'recommend installer for your platform.') If you already have a Java VM installed, you can install the "without Java VM" option. The installer will give you an option to choose which VM you will use. This should be all you need to run and explore the models included with Ascape.

    If you plan to develop models in Ascape, you will probably want to download a Java Development Kit for your platform.

    Free JDKs are available from many different vendors and for many different environments. See http://java.sun.com/cgi-bin/java-ports.cgi for a list of virtual machines available on different platforms. Sun does not list non-Sun JDK implementations for the Windows environment here. On windows, the IBM vm is particularly fast, and available at http://www.ibm.com/java/jdk/download/index.html.

    This version of Ascape works with Java version 1.1.x, meaning that it is compatible with all Mac systems and web deployment. Ascape should work fine in JDK 1.2 and 1.3, but needs a few minor package related changes if you wish to recompile the aa.LHV "Long House Valley" Models. (You simply need to remove any import com.sun.java.util.collections.* occurences, please let us know if you need more help with this.)

    If you are installing Ascape into an existing development environment, you need to have the following files available in your class path. (Of course, if you intend to recompile Ascape, you will need to place the src hierarchy in your build path.) Make ascapecore.jar, ascapemodels.jar, jcchart362J.jar, swingall.jar, qtjava.zip and collections.zip available to your Java environment, typically by adding them to your classpath. These files are located in Ascape/lib. The swing and chart jars are not always neccesary; applets can be designed so that they don't need them. Collections.zip is only neccesary for the Long House Valley [edu.brook.aa] code. The version of swingall.jar included is a farily recent build of 1.1.1. This version seems to work better with Ascape then earlier versions. Of course, if you are using a later version of the jdk, you should not need to include swingall, since it is bundled after JDK 1.2.

    Getting Started

    Any information you can give us about your installation and first usage experience will be very helpful to us as we create more documentation. Please let us know what would be most valuable to you in improving end-user and developer documentation. In particular, please let us know if there are areas that seem totally unclear, or if you get stuck at any stage.

    User

    The installer should create an Ascape launcher appropriate for your environment. For example, in a Windows or Macintosh environment a double-clickable Ascape application icon is created in the start menu or on your desktop. If the installer for your system does not create a launcher, you should be able to invoke Ascape by launching it in Java from the command-line:
    java edu.brook.ascape.model.Scape
    
    When Ascape first launches, you can start a model by selecting one of the included Brookings models from the popup menu, or by typing in a model name. It is not neccessary to enter 'edu.brook.' in this dialog, so for instance, you can just enter pd.PD2D to start the Prisoner's Dilemma model.

    If you are using a command-line interface, or if you are using an application builder tool like Apple's JBindery, you can launch specific models by specifiying the fully qualified model class name as an argument. For example, to launch PD2D from the commmand line, type:
    java edu.brook.ascape.model.Scape edu.brook.pd.PD2D
    
    At the moment, there is very little user-level documentation; this should change soon. However, Ascape is pretty straightforward and experimentation should get you a long way. Examine each of the functions of the control bar. Click the control bar 'settings' (World Icon) button to experiment with model parameters and rules. Double-click on chart and view windows to modify them. Alt/Option/Meta-click on an overhead view to inspect cell and agent state. Shift-Alt/Option/Meta-click on an overhead view to create an agent inspector that 'follows' an agent.

    Developer

    For the programmer, Ascape is pretty strongly documented internally. Full javadoc apis are provided in the api directory, and again, experimentation is encouraged. In particular, the documentation for edu.brook.model.Scape provides good usage examples for the Ascape modeling envrionment. Take a look at edu.brook.pd.PD2D for a well documented implementation of a model in Ascape.

    It is not neccesary to have an IDE (Integrated Development Environment) such as Symantec Visual Cafe, IBM's VisualAge, Metrowerk's CodeWarrior or Borland's JBuilder, but they can be a useful aid to the development process. There a also a number of freeware or shareware development environments that are available for diferent platforms, or you can simply use a text editor with one of the free JDK kits.

    Known Issues

    Macintosh users only: If a window's view is completely obscured behind another window, the whole model will stop running. This is due to an issue with the Macintosh implemenetion of peer painting. We are investigating solutions. In the meantime, if this happens simply make sure that all views are at least partially visible.

    Acknowledgements

    Thanks to Robert Axtell and Joshua Epstein for the science and support that made this framework possible, to David Hines for web design and the Ascape logo, among many other things, and to everyone else at the Center on Social and Economic Dynamics. Alan Lockard wrote the implementation of chapter four of the sugarscape models, and provided other much needed help. Jason Harburger helped with batch and data output testing and development and model documentation, including the model 'about' dialog text. Of course, this work benefits greatly from the work of many researchers in the agent based modeling world. In particular, the Swarm community has been an inspiring and helpful environment in which to explore and discuss modeling issues, and Swarm itself has inspired a number of Ascape features.

    Special thanks to the early testers of Ascape, including Ginger Booth, Ross Hammond, Alan Lockard and Eric Verhoogen, who provided many useful comments, ideas and feedback, and who graciously put up with many changes and new 'features'.

    Contact Inforamtion

    Miles Parker
    The Brookings Institution
    1775 Massachusettes Ave. NW
    Washington, DC  20036
    mparker@brook.edu
    [Please send technical questions, bug reports, etc.. to the mailing list only.]
    
    Home Page:
    
    http://www.brook.edu/es/dynamics/models/ascape
    
    Mailing List:
    
    http://www.brook.edu/scripts/lyris.pl?enter=ascape&text_mode
    

    Version History

    [1.9.1]
    
    Maintenance release:
    [1.9]
    
    Extensive user-interface and functionality enhancements, including:
    
    
    [1.6]
    
    Interim version. (No official release.)
    
    [1.5.1]
    
    Mostly small fixes and refactoring.
    
    Added ability to easily create calculated statistics. These statisitics can be used for summary or derivitive stat calculations.
    
    Fixed problem with inital stat calculation.
    
    Cleaned up stat calculation, initialization and running code and rules.
    
    Many changes to ViewFrameBridge and related code to clarify and better support creation of web deployment package.
    
    [1.5]
    
    Many important and minor changes, including, but not limited to:
    
    Ascape is no longer a 'technical release' and can be considered a full release. While there are many important
    features to add, it is now essentially feature complete.
    
    Created standard 'open' dialog functionality with easily accessible standard models..can now invoke Scape directly from command-line.
    
    Many important model behaviors, including rules selection and execution order and style, are now accessible
    at run time and can be modified through the model 'settings' customizer. Click on the globe button in the toolbar to
    check this feature out.
    
    Implemented rule execution through an iterator pattern, so that new scape topologies can be created simply
    by providing an iterator, and the execution order can be safely and consistently maintained in one place (ScapeGraph.)
    
    Changed the names for execution order from the confusing (because of association with parallel processing)
    "Parallel/Serial" to "Rule Order/Agent Order". Added repeated draw functionality, and moved it from execution order
    to a new property, 'execution style.'
    
    Now deploying though InstallAnywhere installer.
    
    Added an 'about' dialog feature that makes it possbile to easily create custom about dialogs for your models. You can
    now provide about information for your model by simply creating a MyModel.html file and placing it in the appropriate
    place in your model hierarchy. You can include html tags and references in this file. 
    
    Added modest user exception alerting.
    
    Went back to original contruction naming scheme; populate is know called createScape. Note that I did not go back
    to using a seperate createRules method..seems unneccesary, esp. since rule 'availibility' and selection are now
    seperate issues.
    
    
    [1.3]
    
    No public release..all changes became part of 1.5.
    
    [1.2.5a]
    
    Just a couple of deployment related fixes, and a minor fix for a problem that was causing models to stop
    when swtiching between chart types in the chart customizer.
    
    [1.2.5]
    
    A number of relatively minor changes, bug fixes, and enhancements, as well as new models. The most significant change
    is the addition of support for using images (GIFs) to represent cells in views. This feature will be used more in future
    release. This release also includes an implementation of heatbugs that should be familiar to Swarm users.
    
    [1.2]
    
    I've finally made a change that I wanted to make at almost the moment I designed the initial framework. I've changed the names of
    engine and observe to model and view to more explicitly reflect the overall design pattern behind them, and also because I think
    they are more appropriate names.
    
    Many rules classes have become anonymous inner class instance members of Agent or Scape.
    
    Changed the implementation of a number of "feature" type classes so that they can be implemented
    as inner and anonymous classes more easily. These include DrawFeature@, ColorFeature@, UnitIntervaldataSource@, and StatCollector@.
    
    Changed stat collection mechanism to allow for non-automatic collection of stats. (Partially
    implmented earlier.) Made StatCollector.getValue non-abstract, neccessitated by non auto collection.
    Again, added support for name and auto collect member variables so that it it no longer neccesary to override these methods.
    
    Added support for custom sliders and live model changes.
    
    Copied many random functions to Ascape objects, using random seed, so that common random functions are
    accessible to all objects without having to go through Utility.
    
    Provided access to the random seed used for the running model, even if the seed was set arbitraily (using system time.)
    
    Added an abstraction for data series that provides a way of customizing any aspect of a data series view.
    In the initial case, it allows one to set wheteher data should be represeneted as continuous (a curve) or discrete (points.)
    
    Implemented all the 'settings' style frames as customizer panels.
    
    I'm considering removing the nested drawing feature from DrawFeature, since I haven't really found a use
    for it. Let me know if you find it useful.
    
    Created jar files and changed the distribution's directory structure to better conform to standard practice.
    
    Added a standard out view which manages printing model information to the console. (You can disable this
    by calling getRoot().removeScapeListener(getStandardOutView());.
    
    Fixed many bugs, and added may minor features.
    
    [1.1.2]
    
    Abstracted frames and created view manager, providing simpler support for different viewing
    environments, and for deploying simple applets. (See appletsupport folder.)
    
    Fixed a bug in ScapeArray2D causing incorrect execution of random rules in parallel.
    
    [1.1.1]
    
    Truly random rule execution for 2D lattices (previously only supported for occupants.)
    
    Expanded api for finding cells, etc..
    
    Standard methods for view updates.
    
    Many fixes to find cells etc..
    
    Limited support for internal frames. (Broken in Win95.)
    
    Many other minor improvements.
    
    [1.1]
    
    There are significant enhancements this time, including:
    
    The ability to assign set period values (from a historical record, for example) to agents.
    
    Data collection methods and views.
    
    "Pluggable" drawing features, including the ability to change them at runtime from a user dialog.
    
    Automatic discovery of model paramaters at runtime, allowing their modifcation in a running model
    through user customizers, or using command line paramaters.
    
    New models.
    

    Updating from Previous Versions

    [1.9/1.6]
    
    Replace ...
    Change any calls to view.getRunsPer() to view.getSweep().getRunsPer()
    Any references to REQUEST_QUIT wwith REQUEST_CLOSE (these pprobably would not be used directly by developers.)
    Any reference to ScapeEvent.REQUEST_UPDATE with ScapeEvent.RREPORT_ITERATE
    
    No changes are neccesary to take advantage of new user interface feautures, excpet that you may want to
    add more getters and setters to your Cell and Agent objects. Adding these getters and setters will allow
    the customizer to automatically display and allow updating for cell values. Of course, to allow read only
    access to a variable simply provide a getter but no setter.
    
    Any Code that uses Data..View's classes will have to be modifed to use the modifed classes. This should
    be straightforward, lete us know if you have any problems.
    
    When using any of the Data..View's, the following changes should be made:
    
    
    [1.5]
    
    Replace all occurences of clearRules() with getRules().clear() or get getRules().clearSelection()
    Replace        ""         SERIAL with AGENT_ORDER
    Replace        ""         PARALLEL with RULE_ORDER
    Replace        ""         IterationsPerCycle with AgentsPerIteration
    Replace        ""         ITERATE_ALL with ALL_AGENTS
    Replace        ""         AutoPopulate with AutoCreate
    Replace        ""         populate with createScape
    
    
    [1.2.5]
    
    No changes should be neccesary.
    
    [1.2]
    
    Replace engine with model and observe with view
    
    Replace *PopulateOnInitialization with *AutoPopulate
    
    Replace any ViewManager with FrameManager
    
    [Optional] You may want to replace calls to any constructors of "feature" like classes to a newer, simpler
    pattern. (See above for list of classes affected.) As an example, you could change:
    	new StatCollectorCondition() {
            public boolean meetsCondition(Object object) {
                return (((Player) object).strategy == PD2D.DEFECT);
            }
            public String getName() {
                return "Defect";
            }
        }
    to:
    	new StatCollectorCondition("Defect") {
            public boolean meetsCondition(Object object) {
                return (((Player) object).strategy == PD2D.DEFECT);
            }
        }
    In general this change should apply to any classes were you were previosly required to provide an implementation
    of get name. You can now provide a name in the constructor or using a setter. If you want to do this with ColorFeature,
    implement ConcreteColorFeature _not_ ColorFeature, which remains an interface.
    
    Reverse the order of a contructor's paramaters for ColorFeatureFixed to ColorFeatureFixed(String, Color)
    
    Reverse the order of a contructor's paramaters for ColorFeatureGradiated to ColorFeatureGradiated(Color, UnitIntervalValueSource) and ColorFeatureGradiated(String, Color, UnitIntervalValueSource)
    
    Replace any calls to [ScapeVector].newElement() with [ScapeVector].newAgent().
    
    [Optional] From within any AscapeObject, you can replace any calls having the pattern:
    
        Utility.random*(getRandom(), ..);
        
    with
    
        random*(..);
    
    [1.1.2]
    
    None
    
    [1.1.1]
    
    Just one change for exisiting models this time. A lot of method calls of the form get...() have been
    changed to find...(). My future guideline will be that if a call typically returns the same result, then I'll
    use get, but if it can return an arbitrary result, like findRandom, and/or can involve a lot of
    calculation, like findCell or findAvailable, I'll use the find. I'd reccomend just doing a compile and
    replacing anything that comes up.
    
    get*() -> find*() for many cases in ScapeGraph and ScapeArray2D
    
    [1.1]
    
    In this release, I've tried to streamline things and clean things up a bit. I have made some significant
    name changes once again, sorry! I felt it would be best to make these changes now, while there are just
    a few users; I really think that they'll help make things more clear for later users.
    
    You should be safe just doing a global replace for these. Many of them are new features, so you probably
    haven't used them much, with the exception of ValueSeriesSource -> Stat. If your code is small, the
    simplest thing to do would be to rebuild your entire project, and then just replace anything the compiler
    chokes on.
    
    If you have trouble, drop me a note and I'll try to help you fix things up.
    
    Classes:
    
    ScapeLatticeDiscrete -> ScapeGraph
    ScapeLatticeDiscrete1D -> ScapeGraph
    ScapeArray -> ScapeArray1D
    CollectValues -> CollectStats
    
    ValueSeriesSource -> StatCollector
    Stat -> StatCollector
    StatCount -> StatCollector
    StatConditionCount -> StatCollectorCondition
    Stat* -> StatCollector* (but ~CollectStat -> CollectStatCollector!)
    StatCondition* -> StatCollectorCondition*
    
    ValueSource -> DataPoint
    ValueSeries -> DataSeries
    SeriesGroupSelection -> DataSelection
    SeriesGroupViewSelection -> DataViewSelection
    SeriesGroup -> DataGroup
    
    ColorSource -> ColorFeature
    FixedColorSource -> ColorFeatureFixed
    GradiatedColorSource -> ColorFeatureGradiated
    DrawColorSource -> DrawColorFeature
    DrawSource -> DrawFeature
    GraphicsSymbol -> DrawSymbol
    
    Methods:
    
    getSeriesGroup -> getData
    getValueName -> getName
    
    Others:
    
    selectGroup -> dataSelection
    SelectGroup -> DataSelection