Class StochPetriNetExamples
-
- All Implemented Interfaces:
public class StochPetriNetExamples
Stochastic Petri net examples mirroring the Kotlin notebooks in stochPetriNet.
This class contains Java implementations that mirror the Kotlin notebook examples found in jar/src/main/kotlin/jline/examples/kotlin/basic/stochPetriNet/. Each method demonstrates a specific Petri net concept using models from the basic package.
The examples cover: - Basic open and closed Petri net structures - Multiple firing modes and batch processing - Inhibiting conditions and complex token flows - Various stochastic distributions in transitions - Multi-class token systems
-
-
Constructor Summary
Constructors Constructor Description StochPetriNetExamples()
-
Method Summary
Modifier and Type Method Description static void
spn_basic_closed()
Basic closed stochastic Petri net (spn_basic_closed.ipynb). static void
spn_basic_open()
Basic open stochastic Petri net (spn_basic_open.ipynb). static void
spn_twomodes()
Batch processing Petri net (spn_twomodes.ipynb). static void
spn_fourmodes()
Competing transitions Petri net (spn_fourmodes.ipynb). static void
spn_inhibiting()
Inhibiting transitions Petri net (spn_inhibiting.ipynb). static void
spn_closed_twoplaces()
Closed Petri net with two places (spn_closed_twoplaces.ipynb). static void
spn_closed_fourplaces()
Closed Petri net with four places (spn_closed_fourplaces.ipynb). static void
spn_open_sevenplaces()
Open Petri net with seven places (spn_open_sevenplaces.ipynb). static void
main(Array<String> args)
Main method demonstrating selected Petri net examples. -
-
Method Detail
-
spn_basic_closed
static void spn_basic_closed()
Basic closed stochastic Petri net (spn_basic_closed.ipynb).
Demonstrates a simple closed Petri net with cyclic token flow between two places using multiple solvers.
Features: - 3 tokens initially in Place1, cycling between Place1 and Place2 - Exponential firing rates for transitions T1 and T2 - Multiple solver comparison (CTMC and JMT) - Token conservation analysis
-
spn_basic_open
static void spn_basic_open()
Basic open stochastic Petri net (spn_basic_open.ipynb).
Shows fundamental open Petri net structure with source, place, transition, and sink.
-
spn_twomodes
static void spn_twomodes()
Batch processing Petri net (spn_twomodes.ipynb).
Demonstrates batch token processing where transitions require and produce multiple tokens.
-
spn_fourmodes
static void spn_fourmodes()
Competing transitions Petri net (spn_fourmodes.ipynb).
Shows resource competition between transitions requiring different numbers of tokens.
-
spn_inhibiting
static void spn_inhibiting()
Inhibiting transitions Petri net (spn_inhibiting.ipynb).
Demonstrates inhibitor arcs that prevent firing when tokens are present in certain places.
-
spn_closed_twoplaces
static void spn_closed_twoplaces()
Closed Petri net with two places (spn_closed_twoplaces.ipynb).
Simple closed system demonstrating token circulation between two places with different service rates.
-
spn_closed_fourplaces
static void spn_closed_fourplaces()
Closed Petri net with four places (spn_closed_fourplaces.ipynb).
More complex closed system with tokens cycling through four different places using multiple transitions.
-
spn_open_sevenplaces
static void spn_open_sevenplaces()
Open Petri net with seven places (spn_open_sevenplaces.ipynb).
Complex open system demonstrating token flow through multiple places with varied routing probabilities.
-
-
-
-