Monitors

Monitors

What is a monitor? When simulating CP-nets, it is often useful to be able to examine the markings and occurring binding elements, to periodically extract information from the markings and binding elements, and then to use the information for different purposes, such as: Stopping a simulation when a particular place is empty Counting the number of times a transition occurs Updating a file when a […]

Read Me Leave comment

Create a monitor

Create a monitor

The Monitoring tools:start are used to create monitors. Each tool cell in the Monitoring tool palette creates a different kind of monitor; see the Palette tools page if you are unsure about how to work with palettes. To create a monitor, select the desired kind of monitor, e.g. a write-in-file monitor, and apply the tool to the subnet to be monitored. Some monitors can only […]

Read Me Leave comment

Data types for monitored subnets

Data types for monitored subnets

Each monitor is associated with a subnet of a CPN, i.e. a set of places and transitions from the CPN. During a simulation a monitor can examine and extract information from the subnet. A subnet consists of: Zero or more place instances and Zero or more transition instances Three data types are defined for each monitor when a monitor is created, and these data types […]

Read Me Leave comment

Edit a monitor

Edit a monitor

Modifying a monitor After a monitor has been created it can be modified. Different kinds of information can be changed for each of the different monitors. This page provides a general introduction to editing a monitor. For detailed descriptions of what can be edited for each kind of monitor, see the descriptions of the individual kinds of monitors.  Edit monitor name The name of every […]

Read Me Leave comment

Errors in monitors

Errors in monitors

Errors can occur in monitors for many different kinds of reasons. Errors in names Errors in monitor names Monitor names must fulfill the requirements stated under the naming policy. Here an attempt is made to give a monitor an illegal name, i.e. a name that cannot be converted to a non-empty CPN ML identifier. Then the name of the monitor will revert to the previous […]

Read Me Leave comment

Monitoring functions

Monitoring functions

Each monitor has a number of different functions that are used for different purposes. Some examples of functions for monitors are: predicate function for checking if the relevant condition is fulfilled observation function for extracting information from the net action function for doing something relevant with the extracted data initialization function for initializing a monitor before a simulation starts stop function for concluding a monitor […]

Read Me Leave comment

Monitor template code

Monitor template code

All monitors contain monitoring functions. Some of the monitoring functions are hidden from the user, while other monitoring functions are accessible for the user. If a monitoring function is accessible for a user, then the function can also be modified by the user. A user is never required to write a monitoring function from scratch, because it is always possible to generate template code for […]

Read Me Leave comment

Breakpoint monitors

Breakpoint monitors

Breakpoint monitors are used to stop simulations when certain conditions are fulfilled. There are three breakpoint monitors: Place contents monitors, Transition enabled monitors, and Generic breakpoint monitors. Examples of breakpoint monitors can be found in the Queue System. Place contents monitors A place contents monitor checks the number of tokens on a place to determine if a simulation should be stopped. The simulation can be […]

Read Me Leave comment

Breakpoint monitoring functions

Breakpoint monitoring functions

Each one of the breakpoint monitors has two monitoring functions: a predicate function and an action function. The predicate function is called after simulation steps. When the predicate function returns true, the action function will set a flag in the simulator to indicate that a simulation breakpoint – that is, a simulation stop criterion – has been fulfilled. Accessibility of the monitoring functions for the […]

Read Me Leave comment

Data collector monitors

Data collector monitors

Data collector monitors are used to extract numerical data during simulations. The numerical data is used when calculating statistics, and the data may be saved in data collector log files. A data collector can calculate either timed or untimed statistics, which are described on the help pages for calculating statistics. Data collector monitors are used for performance analysis of CPNs. There are four data collector […]

Read Me Leave comment