Create a timed CP-net
How-to


Related Pages

Introduction to timed CP-nets, Timed Resource Allocation, Simulator functions

Create a Timed CP-net

A CP-net is timed if at least one of its colour sets is a timed colour set.

Declaring a Timed Colour Set

To delcare a timed colour set, declare it as you ordinarily would (see Add/edit declarations), and append the keyword timed to the declaration, as described under Timed colour sets.

Declaration of a timed colour set

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 example net for the Timed Resource Allocation system is an example of a timed CP-net.