Performance options functions

There are a number of functions that can be used to access and change options related to Performance analysis.

CPN'PerfOptions.get_ci_percentages()
Returns a list of the levels of confidence intervals that are calculated, i.e. a list containing a subset of the values {90,95,99}
CPN'PerfOptions.set_ci_percentages l
Sets which levels of confidence intervals should be calculated based on the list l. An error will occur if l contains values that are not in the set {90,95,99}.

The following can be used to check or select which statistics will be saved in simulation and replication performance reports. In most cases, it will not be necessary to use the following functions, because net-specific options in the Overview of a net are used to select statistics.

CPN'PerfReport.getIncludedUntimedStats()
Returns a record indicating which untimed statistics will be included in simulation performance reports.
CPN'PerfReport.selectUntimedStats r
Selects the untimed statistics to be included in simulation performance reports based on record r. The record r should have the same type as the record returned by CPN'PerfReport.getIncludedUntimedStats().
CPN'PerfReport.getIncludedTimedStats() :
Returns a record indicating which timed statistics will be included in simulation performance reports.
CPN'PerfReport.selectTimedStats r
Selects the timed statistics to be included in simulation performance reports based on record r. The record r should have the same type as the record returned by CPN'PerfReport.getIncludedTimedStats().
CPN'PerfReport.getIncludedIIDStats()
Returns a record indicating which statistics will be included in replication performance reports.
CPN'PerfReport.selectIIDStats r
Selects the statistics to be included in replication performance reports based on record r. The record r should have the same type as the record returned by CPN'PerfReport.getIncludedIIDStats().

Examples of use

The following can be used to check which timed statistics will be saved in simulation performance reports.

val x = CPN'PerfReport.getIncludedTimedStatistics()

If the Evaluate ML tool is applied to the code above, then the result would be the following

val x =
  {avrg=true,ci=false,count=true,first=false,interval=true,last=false,
   lasttime=false,max=true,min=true,ss=false,ssd=false,starttime=false,
   std=false,sum=false,vari=false}
  : {avrg:bool, ci:bool, count:bool, first:bool, interval:bool, last:bool,
     lasttime:bool, max:bool, min:bool, ss:bool, ssd:bool, starttime:bool,
     std:bool, sum:bool, vari:bool}

To select which timed statistics should be included in simulation performance reports, the following could be either evaluated using the Evaluate ML tool before a simulation is started or called in a function that is called before a simulation is started.

val selectTimed = CPN'PerfReport.selectTimedStats(
    {avrg=true,c i=false,count=true,first=false,last=false,max=true,min=true,
     ss=false,ssd=false,std=false,sum=false,vari=false,interval=true,
     starttime=false,lasttime=false})

Related pages