Presentation is loading. Please wait.

Presentation is loading. Please wait.

/faculteit technologie management DEMO CPN-tools Ronny Mans Eindhoven University of Technology, Faculty of Technology Management, Department of Information.

Similar presentations


Presentation on theme: "/faculteit technologie management DEMO CPN-tools Ronny Mans Eindhoven University of Technology, Faculty of Technology Management, Department of Information."— Presentation transcript:

1 /faculteit technologie management DEMO CPN-tools Ronny Mans Eindhoven University of Technology, Faculty of Technology Management, Department of Information Systems, P.O.Box 513, NL-5600 MB, Eindhoven, The Netherlands.

2 /faculteit technologie management 2 Outline –Introduction to CPN Tools Building a net Time, Hierarchy and Color Analysis Simulation –Single run, replications –Monitors –Net for DCT case

3 /faculteit technologie management 3 Classical Petri net Simple process model –Just three elements: places, transitions and arcs. –Graphical and mathematical description. –Formal semantics allows for analysis.

4 /faculteit technologie management 4 Limitations of classical Petri nets Inability to test for zero tokens in a place. Models tend to become large. Models cannot reflect temporal aspects No support for structuring large models, cf. top-down and bottom-up design High level Petri nets in CPN –Color –Time –Hierarchy

5 /faculteit technologie management 5 CPN (Colored Petri nets) CPN is the language developed by Kurt Jensen. CPN supports the extensions with time, color and hierarchy. CPN is based on standard ML. CPN is supported by Design/CPN and CPN Tools. For more information: http://www.daimi.au.dk/CPnets/

6 /faculteit technologie management 6 Simulations Simulations of CP-nets are run for many reasons: –Debugging –Analysis of system behavior (performance or functional) –Presentation of a model to project team –Communication with external programs The usefulness of the simulations is heavily dependent on the flexibility and functionality of the simulator. –Access to simulation information –Stopping simulations

7 /faculteit technologie management 7 Accessing simulation information It is often useful to be able to exchange information between the CPN simulator and external processes or files. Code segments can be added to transitions for: –Reading and writing in files –Calculating some performance measures –Sending and receiving information from external processes

8 /faculteit technologie management 8 Controlling a simulation Simulation stop criteria –Number of steps executed –Dependent on model time –Dependent on markings or transitions

9 /faculteit technologie management 9 Common functionality These controlling and accessing activities share a common pattern: If certain conditions are fulfilled, then do something. –If transition T occurs, then save information in a file. –If there are no tokens on place P, then stop the simulation. –If model time is greater than C, then calculate the average number of tokens on place P.

10 /faculteit technologie management 10 Problems when simulating Problems controlling and accessing simulation information: –Cannot access marking information. –Net structure may have to be changed to obtain desired functionality. –If multiple transitions need to be inspected, then code segments must be duplicated. –Code segments cannot be disabled. –Only low-level support, which is difficult to use.

11 /faculteit technologie management 11 Monitors in CPN Tools monitor (verb) to watch, keep track of, or check, usually for a special purpose Merriam-Webster’s Collegiate Dictionary A monitor is a mechanism that is used to observe, inspect, control or modify a simulation of a CP-net. Important characteristics of monitors: –They can inspect the states and events of a simulation, and take appropriate actions based on the observations. –There is an explicit separation between monitoring the behavior of a net, and modeling the behavior of the system.

12 /faculteit technologie management 12 Levels of monitors Standard monitors –Very easy to define –Do not require users to write any code Parameterized monitors –Similar to standard monitors, but slightly more flexible, and require some programming User-defined monitors –Very flexible, but require more programming

13 /faculteit technologie management 13 Monitoring subnets A monitor can inspect markings and occurring transitions, with variable bindings, during a simulation –Zero or more places –Zero or more transitions Monitors are activated after simulation steps –After every simulation step, if no transitions are monitored –After every relevant transition has occurred

14 /faculteit technologie management 14 Data Collector monitors Mark Size (used on places) List Length Data Collector(used on places) Count Transition (used on transitions) Generic Data Collector (used on subnets)

15 /faculteit technologie management 15 Breakpoint monitors Place Content(used on places) Transition Enabled(used on transitions) Generic Breakpoint(used on subnets)

16 /faculteit technologie management 16 Other monitors Write in file (used on subnets) User defined (used on subnets)

17 /faculteit technologie management 17 Monitoring functions –Initialization function Called once before a simulation –Predicate function Called after simulation steps –Observation function Called when predicate function returns true Extracts relevant data from the model –Action function Does something appropriate with the observed value –Stop function Called once after a simulation

18 /faculteit technologie management 18 Questions?


Download ppt "/faculteit technologie management DEMO CPN-tools Ronny Mans Eindhoven University of Technology, Faculty of Technology Management, Department of Information."

Similar presentations


Ads by Google