Task 1 during Task 2

The coordination mechanism for the relation Task2 duringA Task1 is shown in Figure 24. In the model, the firing of t1 sends tokens to places P1 and P2, the latter indicating to Task2 that Task1 has already started (enabling the firing of task2 only once). After the firing of task1 (token in P3), a token will only be sent to finish_task1 at the end of Task2 (token in P4). In order to avoid that Task1 waits infinitely, there is a timeout inhibited by the presence of a token in start_task2 (i.e., Task1 will not be finished if Task2 is ready to begin).

Figure 24: Coordination mechanism for Task2 duringA Task1.

In order to enable multiple executions of Task2 during the execution of Task1 (duringB), it is necessary to make a few modifications in the model of Figure 24. The first one is to add a return arc from task2 to P2, enabling future firings of task2. In addition, transition t2 must have P2 as input place instead of P4, which is removed from the model. The reason for this is that, at the end of Task1 (firing of t2) the token must be removed from P2 to avoid future occurrences of Task2. It is also necessary to include an inhibitor arc from start_task2 to t2, avoiding that Task1 finishes while Task2 is ready to be executed. The resulting model is presented in Figure 25.


Figure 25: Coordination mechanism for Task2 duringB Task1.

In both cases (duringA and duringB) there is an internal timeout to avoid that Task2 waits indefinitely for Task1.

The models using high level PN are shown in Figures 26 and 27.


Figure 26: Task B duringA TaskA using high level PN.


Figure 27: Task B duringB TaskA using high level PN.

<< Back