A CPN is timed if at least one of its color sets is a timed color set.
Declaring a timed color set
To declare a timed color set, declare it as you ordinarily would (see Add/edit declarations), and append the keyword timed
to the declaration, as described under Timed color sets.
Giving a token a time stamp
Tokens get time stamps via expressions called delay expressions. A delay expression has the form:
@+ expression
where @+
appears literally, and expression is an arithmetic expression of type integer
.
A delay expression defines a time equal to the current simulated time (symbolized by the @
sign) plus (+
) the value of the expression
. This value becomes the time stamp of any tokens created under the aegis of the delay expression. There are three ways to use a delay expression to provide time stamps for tokens: by putting it in a transition time inscription, by appending it to an arc inscription of an output arc from a transition, or by using it in an initial marking inscription.
Time functions
Functions for accessing current model time, and converting current model time to and from integers and strings are described under Simulator functions.
Example net
The Timed Resource Allocation system is an example of a timed CPN.
Related pages
Introduction to timed CPNs, Timed resource allocation, Simulator functions
You must be logged in to post a comment.