Often one would like to limit the capacity for a place, for example, to model a network buffer or simply to make the net finite to facilitate the generation of state spaces.
Unfortunately, CPN Tools does not support this concept, but this can easily be modeled using the concept of anti-places.
An anti-place is a place corresponding to the original place, where for each arc to/from the original place, there is an arc from/to the anti-place, moving the same number of uncolored tokens.
This is a very simple model of a sender and a receiver. The sender sends packages onto a network, and the receiver receives packages from the network.
Limit the capacity
We would like to limit the place capacity of the network to two. To this end, we add an anti-place with two tokens and obtain the following modified example:
Adding an anti-place
First, add a new place of type
E. Give the new place the name
Anti Network, so it is obvious that it is the anti-place of place
Network. Then give place
Anti Network the initial marking
2`e because the place capacity should be limited to two. Note that the type
E does not have to added, because it is one of the standard declarations.
Changes to (incoming and outgoing) arcs
Keep the original arc and its inscription. Add a new arc in the opposite direction, but attach this arc to the anti-place instead. The inscription of the new arc is as many
e-tokens as are move along the original arc. In this example, the inscription of the original arc is
p (i.e., exactly one token is moved), so the new arc inscription is
e. Had the original inscription been, for example,
1`1++1`3++1`9, the new inscription would have been in all cases
The examples from this document can be downloaded: