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".
  • Monitoring functions << CPN Tools Homepage
    examine the places associated with a monitor but they cannot examine the transitions associated with a monitor In general stop functions are called when a simulation stops because Simulation stop criteria have been met When the Fast forward tool is applied the monitor stop functions will be called in the following situations when the simulation stops If the stop functions have not been previously called during the current simulation If the stop functions have been called during the current simulation and the step number has increased since the last time the stop functions were called When the Bind manually or Single step tools are applied the stop functions are called in the following situations If any Simulation stop criteria are met before the step is executed and the stop functions have not been previously called during the current simulation If any Simulation stop criteria are met before the step is executed and the step number has increased since the last time the stop functions were called When the Play tool is applied it corresponds to applying the Single step tool the specified number of times to random transitions in the appropriate net Therefore the monitor stop functions will be called in the situations described above for the Single Step tool When the Rewind tool is applied the stop functions will be called If the stop functions have not previously been called in the current simulation and the step number is greater than zero If the stop functions have been previously called in the current simulation the step number is greater than zero and the step number has increased since the last time the stop functions have been called Note that stop functions may be called more than once during a simulation This can happen if for example the Fast forward tool is applied several times before applying the Rewind tool The stop functions will not be called in the following situations If only the Bind manually Single step or Play tools are applied if no simulation stop criteria are met during the execution of the specified number of steps and if the Rewind tool is not applied When the Stop tool is applied If the Rewind tool is applied when Step 0 Accessibility of monitoring functions For some kinds of monitors the monitoring functions are completely hidden from users and for other kinds of monitors some or all monitoring functions are accessible for users If a monitoring function is accessible for a user then the user may modify it to obtain the desired behavior For example for a Marking Size monitor all monitoring functions are hidden but for a Write in file monitor almost all monitoring functions are accessible for the user When a monitoring function is accessible the user is not required to write the function from scratch When the monitor is created Monitor template code will be generated for the accessible functions and the user can then modify the template code Examining nodes The monitoring functions for a

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


  • User-defined monitoring functions << CPN Tools Homepage
    monitor accessible accessible accessible accessible accessible Function types for the accessible functions init markings unit initialization function pred subnet bool predicate function obs subnet obstype observation function action obstype unit action function stop markings string stop function The type obstype is the type of the values returned by the observation function The obstype is determined by the user and can be different for each different user defined monitor For more

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

  • User-defined monitors << CPN Tools Homepage
    defined monitor tool to an appropriate target After the tool has been applied a monitor will be added to the index and some Monitor template code will be generated for the User defined monitoring functions There will be syntax error in some of the template code that it generated and the red highlighting of the errors should help to remind the user that the template code must be modified A

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

  • Write-in-file monitoring functions << CPN Tools Homepage
    transitions for more information see the help page for Monitoring functions Example 1 The following initialization function is for a monitor that is associated with one place and two transitions and it returns the empty string fun init Top NextRec 1 mark INT ms Example 2 The following initialization function is for a monitor that is associated with one place and two transitions and it returns a string with information about number of tokens on the place NextRec on the page Top If there is just one token on the place then the function will also return information about the value of the token on the place The INT mkstr function is one of the Color set functions and the ms to col is a function for Multisets fun init Top NextRec 1 mark INT ms let val n size Top NextRec 1 mark in Number of tokens on NextRec in initial marking Int toString n if n 1 then n Value of the token INT mkstr ms to col Top NextRec 1 mark else n n end Predicate functions Example 1 The following predicate function is for a monitor that is associated with one place and two transitions and it returns true when either one of the transitions occurs The function ignores the marking of the place NextRec fun pred bindelem Top NextRec 1 mark INT ms let fun predBindElem Top Receive Packet 1 k n p str true predBindElem Top Send Packet 1 n p true predBindElem false in predBindElem bindelem end Example 2 The following predicate function that is associated with one place and two transitions The function returns true either when the Transmit Ack transition occurs and the acknowledgment is lost as indicated by not Ok s r or when the Transmit Packet transition occurs and the packet is lost fun pred bindelem Top B 1 mark INTxDATA ms let fun predBindElem Top Transmit Ack 1 n r s not Ok s r predBindElem Top Transmit Packet 1 n p r s not Ok s r predBindElem false in predBindElem bindelem end Observation functions Example 1 The following observation function is for a monitor that is associated with one place and two transitions The function returns a string The first part of the string shows the simulation step number The step function is one of the Simulator functions The second part of the string contains information about which transition occurred fun obs bindelem Top B 1 mark INTxDATA ms let fun obsBindElem Top Transmit Ack 1 n r s Transmit Ack occurred n obsBindElem Top Transmit Packet 1 n p r s Transmit Packet occurred n obsBindElem in In step Int toString step obsBindElem bindelem end Example 2 The following observation function is for a monitor that is associated with one place and two transitions The function returns a string The first part of the string indicates how many tokens are on place B The function size is a function for Multisets The second part of

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

  • Write-in-file monitors << CPN Tools Homepage
    monitoring functions A default name is suggested but the name can be changed Unfold the Type index entry to see the options for the write in file monitor To change the file extension edit the text of the option The ML name of the monitor and the file extension specified in the monitor option will be used to create the name of the file that is created by the monitor

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

  • Bernoulli << CPN Tools Homepage
    book 28 page s Help Bernoulli Function for generating values from Bernoulli distributions Interface bernoulli p real int where 0 0 p 1 0 The value returned is either 0 or 1 The function returns a drawing from a Bernoulli distribution with probability p for success i e success 1 It raises Bernoulli exception if p 0 0 or p 1 0 Characteristics Mean p Variance p 1 p Example

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

  • Beta << CPN Tools Homepage
    Home Download Getting Started Documentation Support Contact Book creator Add this page to your book Book creator Remove this page from your book Show modify book 28 page s Help Beta Note Introduced in CPN Tools 3 2 2 Interface beta a real a real real where a b 0 0 Returns a drawing from a beta distribution with parameters a and b Raises Beta exception if a 0 0

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

  • Binomial << CPN Tools Homepage
    Binomial Function for generating values from binomial distributions Interface binomial n int p real int where n 1 and 0 0 p 1 0 This function returns a drawing from a binomial distribution with n experiments and probability p for success It raises Binomial exception if n 1 or p 0 0 or p 1 0 Characteristics Mean np Variance np 1 p Probability mass functions for binomial distributions Example

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



  •