|
|
Design/CPN 4.x manual addendumThis page describes the changes that has been made to the tool, but not covered by the manuals.SML'97The language used for declarations and net inscriptions is now based on the SML'97 standard. This has required some changes to the Design/CPN tool:
IntInf to/from real and int conversion functionsYou may use the functions IntInf.fromInt and IntInf.toInt in order to convert from and to integers.If you need conversion from and to reals you may wish to use following functions supporting fixed point arithmetics:
val RealToIntInf : int -> real -> IntInf.int
val IntInfToReal : int -> IntInf.int -> real
RealToIntInf p rConverts the real r to a IntInf.int with a precission of p digits. IntInfToReal p iConverts the IntInf.int i to a Real with a precission of p digits. Typically one would use something like
val RealToTime = RealToIntInf 6;
val TimeToReal = IntInfToReal 6;
and then use the these functions to convert between Real's and
time.
See also this posting from the mailing list. ChartsThe chart functions BC_create, HC_upd_bar, HC_upd_chart, LC_create, LC_upd_chart, LC_upd_line, LC_upd_pline, SC_upd_bar, SC_upd_chart, and SC_upd_part are no longer overloaded. Suffix the above names with _int or _real to access the functions, i.e. BC_create_int or BC_create_real.Statistical VariablesThe functions related to statistical variables are no longer overloaded on integers and reals, but are now available in the CPN'IUSV and CPN'RUSV structures. The function names are slightly different as most of them are now capitalized, i.e. SV'max becomes CPN'IUSV.Max for integer variables and CPN'RUSV.Max for real variables. The functions for creating statistical variables are USV'CreateInt and USV'CreateReal. More specifically, the following functions are available for creating, updating and accessing statistical variables:Integer statistical variables: USV'CreateInt : unit -> IntInf.int Statvar CPN'IUSV.Avrg : IntInf.int Statvar -> real CPN'IUSV.Count : IntInf.int Statvar -> int CPN'IUSV.First : IntInf.int Statvar -> IntInf.int CPN'IUSV.Init : IntInf.int Statvar -> unit CPN'IUSV.Max : IntInf.int Statvar -> IntInf.int CPN'IUSV.Min : IntInf.int Statvar -> IntInf.int CPN'IUSV.SS : IntInf.int Statvar -> IntInf.int CPN'IUSV.SSD : IntInf.int Statvar -> real CPN'IUSV.StD : IntInf.int Statvar -> real CPN'IUSV.Sum : IntInf.int Statvar -> IntInf.int CPN'IUSV.Upd : IntInf.int Statvar * int -> unit CPN'IUSV.Value : IntInf.int Statvar -> IntInf.int CPN'IUSV.Vari : IntInf.int Statvar -> real Real statistical variables: USV'CreateReal : unit -> real Statvar CPN'RUSV.Avrg : real Statvar -> real CPN'RUSV.Count : real Statvar -> int CPN'RUSV.First : real Statvar -> real CPN'RUSV.Init : real Statvar -> unit CPN'RUSV.Max : real Statvar -> real CPN'RUSV.Min : real Statvar -> real CPN'RUSV.SS : real Statvar -> real CPN'RUSV.SSD : real Statvar -> real CPN'RUSV.StD : real Statvar -> real CPN'RUSV.Sum : real Statvar -> real CPN'RUSV.Upd : real Statvar * real -> unit CPN'RUSV.Value : real Statvar -> real CPN'RUSV.Vari : real Statvar -> real Occurrence graphs
|
|
|
|