next up previous contents index
Next: C.4 Value range structures Up: C. Fundamental Modeling Concepts Previous: C.2 Compositional structures and   Contents   Index

Subsections


C.3 Dynamic structures and Petri nets

C.3.1 Behavior of dynamic systems

Informational systems are dynamic systems. By looking at the channels and locations used to store, change and transmit information for some time, their behavior can be observed. Petri nets are used to visualize the behavior of a system on a certain level of abstraction.

Figure C.2: Petri net: Buying a ticket (View PDF)
TravelAgency_PN.gif

Figure C.2 shows a Petri net describing the causal structure of what can be observed on the channel between the travel agency and one of its customers in our example. Buying a ticket starts with the customer ordering a ticket. Then the travel agency checks the availability and in case this step is successful, concurrently a ticket may be issued to the customer and payment is requested. The customer is expected to issue the payment and when both sides have acknowledged the receipt of the money respectively the ticket, the transaction is finished.

C.3.2 Petri nets

C.3.2.0.1 Building blocks

Petri nets describe the causal relationship between the operations, which are performed by the different agents in the system. Each rectangle is called a transition and represents a certain type of operation. The transitions are connected via directed arcs with circular nodes called places. Places can be empty or marked, which is symbolized by a black token. The behavior of the system can now be simulated by applying the following rule to the Petri net: Whenever there is a transition with all its input places being marked and all its output places being unmarked, this transition may fire, meaning the operation associated with the transition is performed. Afterward all input places of the transition are empty and all its output places are marked.

So, looking at the Petri net shown in figure C.2, in the beginning only the transition labeled "order ticket" may fire. This means the first operation in the scenario being described will be the customer ordering a ticket. Because only the initial marking of a Petri net may be shown in a printed document, it is necessary to process the net by virtually applying the firing rules step by step, until you get an understanding of the behavior of the system. This is very easy, as long as there is only one token running through the net.

C.3.2.0.2 Patterns

Common patterns are sequences of actions, loops and conflicts. A conflict is given if multiple transitions are ready to fire, which are connected with at least one common input place. Because the marking of that input place can not be divided, only one of the transitions may fire. In many cases, a rule is given to solve the conflict. In those cases predicates labeling the different arcs will help to decide which transition will fire. For example, different actions have to be taken depending on the outcome of the availability check. If the check was successful, the travel agency will issue the ticket and request payment.

C.3.2.0.3 Concurrency and Synchronization

In our example, issuing the ticket and payment should be allowed to happen concurrently. Using Petri nets, it is possible to express concurrency by entering a state where multiple transitions may fire concurrently. In the example, we introduce concurrency by firing the unlabeled transition, which has two output places. Afterward both transitions, the one labeled "issue ticket" and the one labeled "request payment", are allowed to fire in any order or even concurrently. The reverse step is synchronization, where one transition has multiple input places, which all need to be marked before it is ready to fire.

C.3.2.0.4 Refinement

Using refinement, it is possible to describe single transitions or parts of the Petri net in more detail. Also, by refining the compositional structure of the system or by introducing a new aspect, additional Petri nets may become necessary to describe the interaction of the new components.


next up previous contents index
Next: C.4 Value range structures Up: C. Fundamental Modeling Concepts Previous: C.2 Compositional structures and   Contents   Index
Apache Modeling Portal Home Apache Modeling Portal
2004-10-29