a new set of environment object types. There is there-
fore little point in bringing the environment objects
directly on the MASON-Grid. Instead, environment
objects with different types should produce different
grid objects. To facilitate this, each environment ob-
ject type of the model is assigned a class in the sim-
ulation system. As described, the object description
provides an entry for the class of the type in the simu-
lation system. This property of an environment object
type is used during conversion to instantiate an appro-
priate grid-object and for position it in the grid.
The environment model is, as described, designed
as a tree whose root is the EnvEditModel-object. The
different environment objects are stored as BaseOb-
ject instances and form the nodes and leaves of the
tree. Important in this arrangement, except the depth
of the environment objects in the tree, is the sequence
of individual children of a node. Both factors, depth
and order are crucial in order to understand the ar-
rangement of the environment objects in three dimen-
sions. Nodes which are located deeper in the tree
hide all their direct predecessor. Sibling nodes and
their children form subtrees. Their order in the com-
mon parent node is interpreted as follows: subtrees
which are placed further back (added later) hide sub-
trees which are located further forward.
During the transformation of the environment
model into a MASON-Grid, the just described tree of
objects is traversed by a depth-first search. If a node
has several sibling nodes the search begins with the
most recently added.
Position and dimensions of the environment ob-
ject are projected onto the grid, and the fields covered
by it are traversed gradually. If there is already a grid
object on a field, it will be skipped and proceed to
the next. If the field is still vacant, the class property
of the environment object is read, and an instance of
the specific grid-object-class is created and attached
to the field. In this way maximum flexibility in the
development of the simulation system is provided.
For instantiation of grid-objects a mechanism of
the Java programming language is used which is in-
ter alia called Dynamic Class Instantiation. The re-
quired classes must be designed by the developers of
the simulation system in cooperation with the devel-
opers of the environment models, since these are di-
rectly related to the object descriptions used in the
modelling. Object descriptions define the data which
an environment object contains, the grid-classes de-
fine the functions of the corresponding program ob-
jects in the simulation. The dynamic class instanti-
ation is used to create a program usable class out of
the string containing the class property of the environ-
ment objects. The so-used classes must have a com-
mon parent class, so they can be used by the program-
ming language in this way. In the case of EnvEdit, this
is the BaseGridOb ject.
The class BaseGridObject defines the basic func-
tions of all grid classes. These functions can access
the system properties like the x- and y-coordinates,
the height and width and the type of the underlying
environment object directly. All other properties can
be accessed through the underlying environment ob-
ject.
6 CONCLUSIONS AND FUTURE
WORK
EnvEdit is a flexible tool for the design of two dimen-
sional environment models for MASON. The flexible
type system allows it to respond to as yet unknown
requirements, and to map new environment objects.
EnvEdit allows a clear separation of the model data
from the simulation system, and facilitates the devel-
opment of different environment models. The opera-
tion of the software system has been kept simple. The
environment data is transferred into objects which are
usable for the simulation.
In the future we want to allow the creation of so-
called graphs (which describe, for example, road net-
works) directly in the environment model.
Another possible future work is the use of EnvEdit
for the design of environments for different frame-
works than MASON. The flexible type system and the
internal model could make it possible to easily adopt
the integration into the MASON framework for other
MAS-libraries.
REFERENCES
Balan, G. C., Cioffi-Revilla, C., Luke, S., Panait, L., and
Paus, S. (2003). Mason: A java multi-agent simula-
tion library. In Proceedings of the Agent 2003 Confer-
ence.
Beth, C., Kamenik, J., Ommen, D., and Hahn, A. (2009).
Design aspects of cognitive logistic systems. In 2nd
International Conference on Dynamics in Logistics.
Luke, S., Cioffi-Revilla, C., Panait, L., Sullivan, K., and
Balan, G. (2005). Mason: A multiagent simulation
environment. Simulation, 81:517–527.
Ommen, D., Beth, C., Kamenik, J., and Hahn, A. (2009). A
system-architecture for robotic movements of goods -
approaches towards a cognitive material flow system.
In ICINCO-RA, pages 342–347.
Ommen, D., Kamenik, J., Beth, C., Busch, J. C., Kulas,
A., Cramer, E., and Hahn, A. (2010). An adaptable
architecture for intelligent conveyors. In ICINCO (1),
pages 249–254.
ICAART 2012 - International Conference on Agents and Artificial Intelligence
308