Any complex application requires prototyping and simulation. Simulation is
typically used in three different situations:
When part of the application's functionality is in time-consuming compu-
tations, or is not ready yet.
When the application is a distributed system and needs to be tested
locally on a single computer.
When the application interacts with real devices, which cannot be used
for testing and debugging.
A typical example is a manufacturing work cell made up of a number of
physical devices (robots, machines, transporters) and a work cell controller,
which coordinates and synchronizes the concurrent activities of the work
cell system (e.g. moving piece, machining, loading). The prototype that
simulates the work cell system is an executable specification on a single
processor of the naturally concurrent reality. This chapter addresses the
problem of building a discrete event simulation environment for testing the
correct behaviour of a work cell controller.
Focus: the emphasis is on the software architecture of the simulator that
is general enough to be applied in a variety of application scenarios.
OO techniques: finite state automata to model the components' dynamics.
Java features: information hiding and inheritance.
Background: the chapter refers to well-known domain models for event
communication, synchronization and time simulation.
A manufacturing work cell is a control system at the shopfloor level of a
factory. It is made up of a certain number of machine tools, stores and auto-
matic transportation systems, which concurrently process pieces in lots.
Each piece undergoes a sequence of operations that implements the manu-
facturing process. For simplicity, each machine can perform only one type
of operation. The processing time depends on the type of operation.
Let's consider the case of a work cell for machining and assembling bolts.
The cell is made up of two numerically controlled machines for machining