Einführung

Process → Substeps

The behaviour of a process is given by a set of substeps which are executed endlessly in a loop.
Each substep is specified by an java statement. Any valid java statement can be declared as a substep. In addition to the simple statements you can also declare complex statements like for-, while- and if-statements. Figure 12 shows for example the substeps of a process.

FIFO-Buffer einfügen
Figure 12

There are two different kinds of substeps. For an initialisation phase you can specify a series of initial substeps. These initial substeps are executed once at the beginning of the execution. Besides the initial substeps, the loop substeps exist. The loop substeps are executed after the execution of the initial substeps. They are executed in a loop repeatedly.

During the visualisation the simulation of time is realised by time steps. For this a number of time steps is assigned to each substep of a process. This number of time steps represent the time in which the substep has been executed. Within this training module a time step is the elementary time unit and can not be split into smaller units. It is an abstract among of time and you can interpret it as seconds or minutes depending on the context of your process network example. The stepwise visualisation which is described late in this introduction is also based on these time steps. For more details see chapter Visualisation.

For the sending and receiving of data two additional commands send and wait exist. These commands are not included in the standard java language specification. With the command send a process can send an integer value to another process. The statement send i to X for example sends the value of the local variable i via the FIFO buffer X to another process. Instead of the variable i you can also specify an integer constant like send 2 to X.
With the command wait integer values can be received from another process. The statement i = wait Y for example reads a value from the FIFO buffer Y and assigns the value to the local variable i. If the FIFO buffer Y is empty, the process has to wait in this substep until the buffer contains new data.

The variables which you use in the substeps are local to the process. They are declared by assigning a value to them in a substep. Figure 12 shows for example that the boolean variable b has been initialised with the value true in an initial substep. Later it can be used in a loop substep (see Figure 12 if-statement).

In the following subsection you will see how you can add, move and remove a process in the network editor.

 
Introduction > Process > Substeps

Back Next

Startseite   Tutorials   Einführung