General functions
step()
Returns the current step number as anintinf
RealToIntInf d r
Converts the real valuer
to anInfInt.int
withd
digits after the decimal pointIntInfToReal d ii
Converts theIntInf.int
valueii
to an real withd
digits after the decimal pointCPN'Replications.nreplications n
Runsn
simulation replications forn>1
Functions in timed simulations
The type of model time is infinite integer (IntInf.int
in SML Basis Library) or reals (depending on model options).
time()
Returns the current model time (as an infinite integer) in timed CPNsModelTime.toString t
Converts model time valuet
to a stringModelTime.fromString st
Converts a string representation of an integerst
to a time value, i.e. an infinite integerModelTime.fromInt i
Converts an integeri
into a time value.ModelTime.add(t1,t2)
Adds the two time valuest1
andt2
ModelTime.sub(t1,t2)
Subtracts the time valuet2
fromt1
ModelTime.mult(t1,t2)
Multiplies the two time valuest1
andt2
ModelTime.lt(t1,t2)
Less than function for time valuesModelTime.cmp(t1,t2)
Comparison function for time valuest1
andt2
that returns an SML order value, e.g.LESS
,GREATER
orEQUAL
ModelTime.col cts
Returns the color value ofcts
which is a color value paired with a time stamp
You must be logged in to post a comment.