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 stamp t (with type ModelTime.time) to the color c
  • ms @+ i : add the integer time delay i to each of the colors in multi-set ms, returns a timed multi-set
  • ? ms @@+ t : add the time delay t (with type ModelTime.time) to each color in multi-set ms, returns a timed multi-set
  • IntInf.fromInt i: convert integer i to a time value
  • tms1 +++ tms2: timed multi-set addition
  • TMS.ms tms: remove the time stamps from the timed multi-set tms, returns an untimed multi-set
Timed color sets
Bottom-up development

You must be logged in to post a comment.