Documentation Set for Swarm 2.2
Prev |  | Next

# Overview of the Swarm Distribution

#### 1. Libraries

The main part of Swarm is a set of libraries, one per source directory. Briefly, the directory organization is as follows:

lib, include, bin. Installed libraries, include files, and helper binaries.

src. Swarm library source files.

- defobj. Support of Swarm style Objective C programming

- collections. Collection library -- various objects that "collect" other objects

- activity. Schedule execution mechanism -- the "process"

- objectbase. Base class for simulated objects -- the "agents"

- space. Spatial environment library (currenly mostly 2D spaces are supported).

- random. Random number library.

- simtools. Collected tools (non-GUI) useful for developing Swarm simulations

- simtoolsgui. Further tools useful for interactive "GUI-oriented" simulations

- gui. Graphical Interface library

- analysis. Objects that help with data processing

#### 2. Sample applications

In addition, there is a set of sample Swarm applications that are distributed separately. Applications are the best current roadmap for the Swarm code: much of what is possible with Swarm is demonstrated in the sample applications. The most important applications are:

- template. Template simulation. The code itself here is trivial, but provides a nice base for new Swarm programmers to start from.

- tutorial. A step-by-step tutorial to using Swarm. The tutorial starts with a simple implementation of a cellular automaton in ordinary "C" and proceeds up to a full-blown GUI-oriented Swarm application in Swarm Objective C.

- heatbugs. Heatbugs, our canonical, simple complex system. The code here is thoroughly commented for use as a guide to swarm programming.

- mousetrap. Mousetrap is a discrete event simulation of a room full of mousetraps loaded with ping-pong balls. The triggering of one of the traps sets off a chain reaction supposedly similar to fission. It is also thoroughly commented.

- market. Market is an Objective-C wrapped piece of legacy code originally written in C. It is a useful example of how to convert legacy code into Swarm; but, it is not very instructive on Swarm programming in general.

Prev | Home | Next
Installing Swarm | Up | Reference Guide for Swarm 2.2