archive-org.com » ORG » C » CPNTOOLS.ORG

Total: 415

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Create a monitor << CPN Tools Homepage
    kinds of monitors can be added to any kind of subnet such as A single place or transition Elements in a group Elements in a global group No places or transitions in which case the tool should be applied to the name of the net in the index When a monitor is created it will be added to the index as the last entry under the Monitors entry in the overview of the net The first line of the new index entry is the name of the monitor A default name will be suggested but the name can be changed The name of a monitor must fulfill the requirements described under Naming policy After creating a monitor it is possible to Edit a monitor A new monitor will not be created if one of the Monitoring tools is applied to a node that either has an error or is unchecked For example a monitor will not be created if one of the monitoring tools is applied to the place A or the transition Send Packet in the figure below When a monitor is created for a global group it is not important that the group contains arcs or inscriptions If

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/create_monitors (2016-04-26)
    Open archived version from archive


  • Data Collector Monitoring Functions << CPN Tools Homepage
    monitoring functions can be found in the example net for the Queue system example Initialization functions The arguments for an initialization function will be the same for the two subnets described above This is due to the fact that transitions cannot be inspected in initialization functions and that both subnets contain the same place Example 1 This initialization function returns the value NONE which means that no data value will extracted from the net by the monitor before the first step of a simulation fun init Top B 1 mark INTxDATA ms NONE Example 2 This initialization function returns a value an integer option as indicated by SOME which means that a data value will be extracted from the net by the monitor before the first step of a simulation In this case the data value is equal to the number of tokens on the place B in the initial marking The size function is a function for Multisets fun init Top B 1 mark INTxDATA ms SOME size Top B 1 mark Predicate functions Example 1 This predicate function is for a monitor that is associated with just place B from the Simple protocol example net The predicate function will be invoked after every step in a simulation because the monitor is not associated with any transitions The function will return true each time it is invoked i e it will return true after every simulation step fun pred Top B 1 mark INTxDATA ms true Example 2 This predicate function is for a monitor that is associated with place B and its surrounding transitions from the Simple protocol example net The predicate function returns true when either of the two transitions occurs and it does not examine the marking of the place B This function returns true each time one of the transitions surrounding place B occurs i e when the marking of place B changes fun pred bindelem Top B 1 mark INTxDATA ms let fun predBindElem Top Receive Packet 1 k n p str true predBindElem Top Transmit Packet 1 n p r s true predBindElem false in predBindElem bindelem end Observation functions Example 1 This observation function is for a monitor that is associated with just place B The function will return the number of tokens on place B each time it is invoked fun obs Top B 1 mark INTxDATA ms size Top B 1 mark Example 2 This observation function is for a monitor that is associated with place B and its surrounding transitions The function will also return the number of tokens on place B each time it is invoked The function ignores the binding element argument bindelem fun obs bindelem Top B 1 mark INTxDATA ms let fun obsBindElem Top Receive Packet 1 k n p str 0 obsBindElem Top Transmit Packet 1 n p r s 0 obsBindElem 1 in size Top B 1 mark end Example 3 This observation function is for a monitor that is associated with place

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/data_collector_monitoring (2016-04-26)
    Open archived version from archive

  • Data types for monitored subnets << CPN Tools Homepage
    number mark No places no transitions datatype BindElem unit type markings unit type subnet unit When no nodes are associated with a monitor then each of the three data types will be of type unit which consists of the single value which is pronounced unity Some places no transitions datatype BindElem unit type markings cs t ms 1 cs t ms 2 cs t ms n type subnet markings Where cs t ms i depends on the color set inscription for the i th place where places are ordered as described above If the color set of the i th place is one of the timed color sets then cs t ms i is the set of Timed multisets over the values from the color set of the place If the color set of the i th place is not a timed color set then cs t ms i is the set of Multisets over the values from the color set of the place Concrete examples of how markings data types are defined can be found below No places some transitions datatype BindElem pgname 1 transname 1 of int var 1 1 type 1 1 var n 1 type n 1 pgname m transname m of int var m 1 type m 1 var m j type m j type markings unit type subnet BindElem For each transition associated with a monitor a constructor is declared in the declaration of the type BindElem Each constructor is a function that takes an integer and a record as arguments and that return something of type BindElem The integer specifies an instance of the transition and the record specifies a binding of the variables of the transition Examples of constructors for binding elements are shown below Some places some transitions datatype BindElem pgname 1 transname 1 of int var 1 1 type 1 1 var n 1 type n 1 pgname m transname m of int var m 1 type m 1 var m j type m j type markings cs t ms 1 cs t ms 2 cs t ms n type subnet BindElem cs t ms 1 cs t ms 2 cs t ms n Data type examples No places no transitions datatype BindElem unit type markings unit type subnet unit Some places no transitions datatype BindElem unit type markings Server tms Jobs ms type subnet markings The data type BindElem is the trivial type unit which means that the monitor is not associated with any transitions The data type markings is a product of two types which indicates that the monitor is associated with two place instances Therefore a monitor with these data types is associated with two place instances and no transitions The color set of the first place the ordering of places is described above is Server The tms indicates that Server is a timed color set The markings of the first place are Timed multisets of Server values The color set of the second place is Jobs

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/data_types_for_monitored (2016-04-26)
    Open archived version from archive

  • Edit a monitor << CPN Tools Homepage
    a default name will be suggested but the name can be changed to something more meaningful The name of a monitor must fulfill the requirements described under Naming policy Edit monitor options Several kinds of monitors have options that can be edited To see the options associated with a particular monitor unfold the Type index entry for the monitor Some options are textual options that can be changed using text editing other options can be selected deselected using check boxes Edit monitoring functions When a monitor contains functions that are visible to the user the functions are available in the index Editing monitoring functions is similar to editing declarations Monitoring functions can be changed using text editing either in the index or after dragging the function to a binder If you want to revert to the template code that was originally created for the monitoring functions for a particular monitor apply the Generate template code tool to the name of the monitor Note that this will replace all monitoring functions for the monitor in question with new template code Add remove places and transitions to a monitor Each monitor is associated with a subset of places and transitions in the net It is possible to add nodes to and remove nodes from the monitor by applying the Add surrounding nodes and Remove tools to appropriate elements under the Nodes ordered by page index entry Note that when nodes are added or removed from a monitor it is quite likely that there will be syntax errors in the visible functions for the monitor see Errors in monitors Moving a monitor or a monitor block It is possible to rearrange the monitors by dragging and dropping within the Monitors entry in the index You can drag monitors into and out of monitor

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/edit_a_monitor (2016-04-26)
    Open archived version from archive

  • Errors in monitors << CPN Tools Homepage
    the names of the nodes associated with the monitor A monitor will be rechecked when the names of the associated nodes are changed Errors in page names Errors will occur in monitors if page names cannot be converted to nonempty CPN ML identifier A monitor will be rechecked when the names of the associated pages are changed Errors in nodes If a node associated with a monitor has an error then the monitor will also have an error In this example there is an error in the place A which means there is also an error in the marking size monitor that should calculate the number of tokens on place A If a node that is associated with a monitor is deleted then the monitor will have an error Here the transition Transmit Packet on page Top has been deleted A monitor will be rechecked when the associated nodes are rechecked e g after adding or editing inscriptions or after being deleted Errors in monitoring functions A monitor will have an error if there is an error in one or more of the accessible Monitoring functions A monitoring function can have a syntax error A monitoring function can have a type error A monitoring function can have an error if one of the monitored nodes is changed after the monitoring function has been created For example changing the name of a transition from Send Packet to Send A Packet would result in this kind of error Making the following kinds of changes can result in errors in monitoring functions Changing names of places transitions pages functions variables constants and color sets Adding or removing variables to arcs Changing whether a color set is a timed color set A monitor will be rechecked when its Monitoring functions are changed Errors in

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/errors_in_monitors (2016-04-26)
    Open archived version from archive

  • Known limitations of monitors << CPN Tools Homepage
    tool Errors may occur if you use state space tool for a net with monitors This may also be true even if the monitors are disabled List length and marking size The code generated for list length and marking size Data collector monitors depends on whether the net is timed or untimed i e whether there is at least one place in the net with a timed color set If the net changes from being untimed to timed or vice versa after one of these data collector monitors has been created then these monitors are not automatically updated You can force the monitor to be updated by editing the monitor e g by modifying the name of the monitor You can then use the Undo tool to undo the change to the name of the monitor Saving closing and reopening the net will also ensure that these monitors will be re created properly Stalled syntax check Sometimes the tool will stall during Syntax checking of nets with monitors This can happen if may monitors are defined or if the monitoring functions are very long When the syntax check stalls the yellow auras on monitor names and transitions do not disappear

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/limitations_of_monitors (2016-04-26)
    Open archived version from archive

  • Monitor index entries << CPN Tools Homepage
    are associated with monitors Name Type Nodes ordered by pages Monitoring functions All monitors have a name type and overview of nodes associated with the monitor Some monitors have Monitoring functions that are accessible i e that are shown in the index other monitors do not have monitoring functions that are shown in the index Name The first line of a monitor i e the line next to the blue triangle is the name of the monitor Names of monitors can be changed by editing the text of the name The names of monitors must fulfill certain requirements These requirements are described under Naming policy Type The first entry under the name of a monitor indicates the Type of the monitor There are several different kinds of Monitors Some types of monitors have options that can be changed If there is a blue triangle next to the Type entry for a monitor then the monitor has options otherwise the monitor does not have any options For example generic breakpoint monitors do not have any options But marking size monitors have an option to indicate whether the data that is collected during a simulation should be saved in a data collector log file Nodes ordered by pages Each monitor is associated with a number of nodes i e places and or transitions in the net The Nodes ordered by pages entry provides an overview of the places and transitions that are associated with the monitor If there is no blue triangle next to the Nodes ordered by pages entry then the monitor is not associated with any places or transitions i e the monitor cannot examine any markings or occurring binding elements during a simulation If there is a blue triangle next to the Nodes entry then unfolding the entry will

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/monitor_index_entries (2016-04-26)
    Open archived version from archive

  • Monitor template code << CPN Tools Homepage
    of many different kinds of elements such pages places transitions color sets and variables Here is a subnet i e a group of nodes that could be associated with a monitor The subnet is on the page named Top Here the template code that would be generated for a predicate function for this particular subnet The first line of the template code indicates that the name of the predicate function is pred The name of the function must not be changed The function takes two arguments bindelem and Top A 1 mark The first argument bindelem is a binding element i e a specification of a transition instance together with a binding for the variables of the transition A description of the legal binding elements for this monitor can be found below The second argument of the function as seen on the second line of the template code has the name Top A 1 mark and type INTxDATA ms This argument is the marking of the first instance of place A on the page Top The colour set of place A is INTxDATA which means that a marking of the place will always be a multiset of INTxDATA i e INTxDATA ms The local function named predBindElem is a function that can be used to examine the binding elements for the monitor The first line of the declaration of predBindElem indicates that one of the legal binding elements for the monitor represents the first instance of the transition Send Packet on page Top where the variables of the transition are p and n Similarly the second line of the declaration of predBindElem indicates that another legal binding element for the monitor represents the first instance of the transition Transmit Packet also on page Top where the variables of the transitions are n p s and r When either one of these two transition instances occurs then the predBindElem function will return the value true Note that in the template code the predBindElem function ignores the values bound to the variables of the two transitions The last line of the declaration of predBindElem indicates that when any other binding element occurs then the function will return the value false This could happen if for example the second instance of transition Send Packet occurred The second to last line of the template code indicates that whenever the predicate function pred is called then the local predBindElem function will be called with the parameter bindelem In this template code the marking of the place A is ignored even though it is passed as an argument to the pred function whenever the predicate function is called Remember that template code must generally be modified in order to obtain the desired behavior Note that different kinds of Monitoring functions will take different arguments For example an initialization function will never have a binding element as an argument because initialization functions are invoked before the first step in a transition The arguments for monitoring functions are

    Original URL path: http://cpntools.org/documentation/tasks/performance/monitors/monitor_template_code (2016-04-26)
    Open archived version from archive



  •