Graphics Programs Reference
In-Depth Information
= M(p w ) ω M(p a )
N
M(p a )
M(p a ) + M(p q )
W(T wa2 )
= M(p w ) ω
=
= M(p w ) ω M(p a )
N
M(p a )
M(p a ) + M(p s )
W(T wa3 )
= M(p w ) ω
=
= M(p w ) ω M(p a )
N
M(p a )
M(p a ) + M(p q ) + M(p s )
W(T wa4 )
= M(p w ) ω
=
= M(p w ) ω M(p a )
N
where M(p w )ω is the firing rate of T w , and the first expression provides
the rates assigned by the algorithm, while the second is how the rate can
be rewritten by exploiting P-invariants. For example, the first equation is
true because T wa1 is enabled only when both t q and t s are not enabled,
and therefore p a must contain N tokens, so that M(p a )/N = 1.
Similar
considerations hold for the other two sets of replicas.
This implies that each set of replicas comprises four mutually exclusive tran-
sitions with equal rate. We can therefore substitute the four transitions with
just one, with the same rate. The SPN obtained with this substitution is
shown in Fig. 9.10: it enjoys the two nice features of being graphically as
simple as the original GSPN, and of producing a reduced number of states.
A further simplification of the SPN in Fig. 9.10 can be obtained by observing
that the two timed transitions T wa and T ws have preconditions equal to the
postconditions, so that their firing does not modify the SPN marking. They
can therefore be removed from the model. We thus come to the net shown
in Fig. 9.11( a).
The covering of the net by the two P-semiflows p a + p q + p s and p s + p w
is even clearer in this very compact model. P-invariants again help us to
further simplify the model, producing the final SPN shown in Fig. 9.11( b).
To make this final step we take advantage of the fact that the sum of tokens
in p s and p w is always equal to S, so that we can translate the test for at least
one token in p w (input arc from p w to T wq ) into a test for less than S tokens
in p s (inhibitor arc with weight S from p s to T wq ). The rate of transition
T wq is changed accordingly from
M (p q )
M (p q )
N [S M(p s )]ω. At
this point both the enabling of T wq and its firing rate are independent of the
marking of p w which can therefore be removed.
The striking simplicity of the final model in Fig. 9.11( b) deserves a few re-
marks. First of all, note that the SPN model is parametric both in N and
in S, but the initial marking only comprises N tokens in place p a : the de-
N M(p w )ω to
 
Search WWH ::




Custom Search