The JAS project

JAS is a simulation toolkit, specifically designed for agent based simulation modelling. Agent based models are representations of dynamic social systems realised through object-oriented computer programs. For a detailed introduction on ABM see the working papers section at http://www.santafe.edu.

JAS is a clone of the Swarm library, an ABM framework originally developed by the Santa Fe Institute for creating multi-agent simulations of complex adaptive systems. Until recently the Swarm project was based at the Santa Fe Institute. The development and management of Swarm is now under control of the Swarm Development Group (http://wiki.swarm.org).

The libraries were originally written in Objective C. In order to make them more standard the SDG developed a Java extension, too.

According to the Swarm experience, we can assert that the most promising approach to develop AB models is represented by the use of object-oriented programming (OOP). So JAS does not define a domain-specific language: it provides the user a collection of ready to use widgets and a set of rules of thumbs to build such kind of simulations. The JAS tools can be easily embedded in the users' models, reducing the code complexity.

Building JAS, we did not want to create a brand new way of building agent based models, but somewhat a rich and open collection of libraries to help researcher to create models and share them in an easy way. Many of the library contained in JAS have been based on open source, reliable and well tested third-party libraries.

In the JAS architecture, agents are organized and managed by fundamental components, called models. A model is a Java class inheriting from jas.engine.SimModel, creating a collection of agents with a schedule of events over those agents. JAS is able to execute more than one model at time. In fact the scheduler is unique and each model shares it. This allows to create complex structures whereby agents of different models can interact with each other.

The Swarm architecture is based on an internal model Swarm and an external observer Swarm. These two aspects of the artificial world is clearly separated in the Swarm system. The objective of the special 'observer' agents is to observe other objects via the probe interface. These objects can provide both real-time data presentation and storage of data for later analysis. The observer agents are actually swarms (a group of agents and a schedule of activity) and a complete experimental framework is obtained by combining the model and observer apparatus.

The distinction between model and observer is a very useful paradigm and the JAS protocol suggests to use this approach, too. Technically it can be implemented simply defining two models (two classes inheriting from SimModel), with one of them playing the role of the observer. See the how-to documents for more details.

The JAS features

Actually JAS provides the following features:

It is based on a discrete-event time simulation engine.

Thanks to a custom Java class-loader, JAS can load models without configuring the CLASSPATH environment variable.

It is able to represent different time units (ticks, seconds, minutes, days...).

It is equipped with a real-time engine, which can be used to implement emulation models. It is able to fire events using the real computer timer.

It supports the XML for data input/output operations and the SVG graphic format.

It provides a genetic algorithms library as well as an artificial neural networks one (classifier systems are still under construction).

JAS provides an implementation of the Sim2Web architecture: a JAS-Zope bridge for web publishing of simulations and remote users interaction.

The MultiRun class manages repetitive executions of a model in order to support automatic parameters calibration.

It provides a powerful statistical package, based on the cern.jet package. Statistical data can be automatically collected in a database, thanks to the JAS database features.

The JAS engine

The core of the JAS toolkit is represented by the simulation engine. It is based on the standard discrete-event simulation paradigm, which allows to manage the time with high precision and multi-scale perspective. We like to stress the important difference between discrete-time and discrete-event time representation. The tools implementing discrete-time engines, like Swarm, are particularly fast in models characterized by loops of events. They are discrete representation of continues time models. When the events happens at different time scales the discrete-time representation is more inefficient than the discrete-event paradigm. Thanks to its discrete-event engine, JAS represents a good compromise in simulating both discrete and continues agent-based models. This makes JAS a generic discrete-event simulation toolkit, also useful to realise process workflow simulation models.

The external libraries

Many features of JAS are based on third-party libraries.

JAS project would be an example of the interoperability and code reutilisation possible with the Open Source licenses. It is useless to reinvent the wheel every time we need a functionality.