Generalized Stochastic Petri Net Analysis with PIPE2

Recently I downloaded PIPE2 which is the Platform Independent Petri Net editor written in Java.  It's an impressive open source and FREE tool to that allows you to model Generalized Stochastic Petri Nets (GSPNs).

So I fired it up and decided to build a simple Producer / Consumer model, aka the "bounded buffer problem".  Here's the GSPN I drew with the PIPE2 editor.

Notice that the highest firing rate for the producer is 100 times that of the consumer (on both timed transitions).  This means we would mostly expect the input buffers to be highly utilized and the PIPE2 analysis shows this.

gspn

Here is PIPE's classification of the above GSPN.

Petri net classification results

State Machine false
Marked Graph true
Free Choice Net true
Extended Free Choice Net true
Simple Net true
Extended Simple Net true

Here is PIPE2's GSPN analysis of the Petri Net.

GSPN Steady State Analysis Results

Set of Tangible States
Busy Buffers Consume Free Buffers Produce Receive Send
M0 0 1 2 1 0 0
M1 0 1 2 0 0 1
M2 0 0 2 1 1 0
M3 1 1 1 1 0 0
M4 0 0 2 0 1 1
M5 1 1 1 0 0 1
M6 1 0 1 1 1 0
M7 2 1 0 1 0 0
M8 1 0 1 0 1 1
M9 2 1 0 0 0 1
M10 2 0 0 1 1 0
M11 2 0 0 0 1 1

Steady State Distribution of Tangible States
Marking Value
M0 0
M1 0
M2 0
M3 0
M4 0
M5 0.00495
M6 0
M7 0.0049
M8 0.00005
M9 0.49015
M10 0.0001
M11 0.49985

Average Number of Tokens on a Place
Place Number of Tokens
Busy Buffers 1.995
Consume 0.5
Free Buffers 0.005
Produce 0.005
Receive 0.5
Send 0.995

Token Probability Density
µ=0 µ=1 µ=2
Busy Buffers 0 0.005 0.995
Consume 0.5 0.5 0
Free Buffers 0.995 0.005 0
Produce 0.995 0.005 0
Receive 0.5 0.5 0
Send 0.005 0.995 0

Throughput of Timed Transitions
Transition Throughput
Done Consuming 0.5
fill 0.5
Production Complete 0.5
remove 0.5

Sojourn times for tangible states
Marking Value
M0 0.0099
M1 0.0099
M2 0.01
M3 0.0099
M4 0.01
M5 0.0099
M6 0.0099
M7 0.0099
M8 0.0099
M9 1
M10 0.0099
M11 1

State space exploration took 0.051s
Solving the steady state distribution took 0.015s
Total time was 0.747s

Finally here is the reachability graph produced PIPE2.

cpreachability

The file format of the saved GSPNs is in an XML dialect.  As you can see PIPE to is more than just a graphical GSPN editor it also does some heavy lifting with the analysis.

I have been able to import the above GSPN into Mathematica but I haven't done much with it in there yet.  That's for tomorrow!

-Phil