Simulator Overview

What is the simulator?

The simulator provides a virtual geographical environment for interaction between multiple software agents. The simulation itself is run as a server, to which the agent clients connect. The world is initialized by loading existing geographical information systems (GIS) data including roads, streams, population centers and political boundaries. An agent can connect to the simulator via TCP/IP, at which point a corresponding agent object is created in the simulation which can percieve and affect the world under command from the network. A script can be run within the simulation, which causes a series of time-based changes to the world and the agents in it.

What does the simulator do?

At present, the simulation world is intialized with GIS data for Central America, centered on Honduras. The data includes major roads, bridges, streams, and cities. The script generates a simulated hurricane Mitch and causes it to follow its historical path, while flooding rivers and damaging roads, bridges, and agents. A sample client application allows a person to connect to the simulation server, view the state of the world, and create vehicle and aircraft agents which traverse the world.

Each hour, on the hour, the simulator resets to its initial state of 12:00pm, October 31, 1998. Simulated time progresses at a scale factor of 24, such that by the end of the hour-long run, a simulated 24-hour period has passed. When the simulator resets at the top of the hour, a user running the SimSpy application will see that their program has also reset to its initial state.

More Detail on the Simulator

The simulator mainly keeps track of geographical relationships between objects. This involves tasks such as updating object positions as they move, and reporting the visible state of the environment in response to client queries. In addition, the simulation allows objects to affect other objects: a storm may flood a river, which then damages a bridge, preventing an agent from later crossing it.

The simulation interface consists of commands sent from the client ("agent 2: follow road 314") and perceptual information sent back to a client from the server ("agent 5 has reached an intersection with the following roads...", "agent 2 sees a destroyed bridge").

More detail on agents and clients

We define a client as a program that connects to the simulation using TCP/IP to exchange information. An agent is an object in the simulation which may (optionally) be controlled by a client. A client can control zero, one, or more agents, and is generally responsible for creating the agents that it will control.

Contained in the simulation are the physical properties of each agent, such as travelling speed, radius of perception, and amount of energy remaining. In this sense, the "physical" body of the agent is controlled by the simulation. The role of the client is primarily that of making decisions based on information provided by the simulation. The client is constrained to perform actions allowed by the simulation. For example, an agent cannot move instantly to an arbitrary position in the world. If the agent is a vehicle, it may be required to follow roads, and will move with some maximum speed.

An API is provided for sending commands to agents and receiving updates on agent state.

More on the sample client application, SimSpy

The sample client application allows you to connect to a running simulation server, view the state of the simulated world, and create agents. Two roles are being played by this application. First, it provides a window into the full state of the world, showing the locations of all objects and their status. This full state is generally not availble to agents, which must query the simulation to find out what they can see. Second, the sample application provides very basic functionality for creating and directing agents.

A client application need not provide as much graphic detail as this sample. To write it, we used MapObjects, a commercial GIS visualization library which must be licensed from ESRI. One option is to write non-graphical client applications, and to use a viewer that we provide to observe the world state in real-time.

What a client should do

A standard client application will follow this procedure:

1) Connect to simulation server
2) Create one or more agents and store their IDs for future communication
3) For the duration of simulation, send commands to agents, asking for information and telling them what to do
4) Remove the agent objects when finished
5) Disconnect from the simulation server