In simulations with time, each token may, in addition to its token value, carry a time stamp, that is, a value of type Time.time
. Currently, the type Time.time
is the type IntInf.int
, i.e. time values are infinite (or unbounded) integers.
Places with timed color sets contain timed multi-sets of values. The @
, @+
, and @@+
operators are used to add time stamps to colors.
Adding a time delay of x
to a color c
will attach a time stamp with a value that is equal to the current model time + x to the color c
.
Operations
c @ t
: attach the time stampt
(with typeModelTime.time
) to the colorc
ms @+ i
: add the integer time delayi
to each of the colors in multi-setms
, returns a timed multi-set- ?
ms @@+ t
: add the time delayt
(with typeModelTime.time
) to each color in multi-setms
, returns a timed multi-set IntInf.fromInt i
: convert integeri
to a time valuetms1 +++ tms2
: timed multi-set additionTMS.ms tms
: remove the time stamps from the timed multi-settms
, returns an untimed multi-set
You must be logged in to post a comment.