Class StochPetriNetExamples
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidMain method demonstrating selected Petri net examples.static voidBasic closed stochastic Petri net (spn_basic_closed.ipynb).static voidBasic open stochastic Petri net (spn_basic_open.ipynb).static voidClosed Petri net with four places (spn_closed_fourplaces.ipynb).static voidClosed Petri net with two places (spn_closed_twoplaces.ipynb).static voidCompeting transitions Petri net (spn_fourmodes.ipynb).static voidInhibiting transitions Petri net (spn_inhibiting.ipynb).static voidOpen Petri net with seven places (spn_open_sevenplaces.ipynb).static voidBatch processing Petri net (spn_twomodes.ipynb).
-
Constructor Details
-
StochPetriNetExamples
public StochPetriNetExamples()
-
-
Method Details
-
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
- Throws:
Exception
-
spn_basic_open
Basic open stochastic Petri net (spn_basic_open.ipynb).Shows fundamental open Petri net structure with source, place, transition, and sink.
- Throws:
Exception
-
spn_twomodes
Batch processing Petri net (spn_twomodes.ipynb).Demonstrates batch token processing where transitions require and produce multiple tokens.
- Throws:
Exception
-
spn_fourmodes
Competing transitions Petri net (spn_fourmodes.ipynb).Shows resource competition between transitions requiring different numbers of tokens.
- Throws:
Exception
-
spn_inhibiting
Inhibiting transitions Petri net (spn_inhibiting.ipynb).Demonstrates inhibitor arcs that prevent firing when tokens are present in certain places.
- Throws:
Exception
-
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.
- Throws:
Exception
-
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.
- Throws:
Exception
-
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.
- Throws:
Exception
-
main
Main method demonstrating selected Petri net examples.- Throws:
Exception
-