Class StochPetriNetExamples

java.lang.Object
jline.examples.java.basic.StochPetriNetExamples

public class StochPetriNetExamples extends Object
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 Details

    • StochPetriNetExamples

      public StochPetriNetExamples()
  • Method Details

    • spn_basic_closed

      public static void spn_basic_closed() throws Exception
      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

      public static void spn_basic_open() throws Exception
      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

      public static void spn_twomodes() throws Exception
      Batch processing Petri net (spn_twomodes.ipynb).

      Demonstrates batch token processing where transitions require and produce multiple tokens.

      Throws:
      Exception
    • spn_fourmodes

      public static void spn_fourmodes() throws Exception
      Competing transitions Petri net (spn_fourmodes.ipynb).

      Shows resource competition between transitions requiring different numbers of tokens.

      Throws:
      Exception
    • spn_inhibiting

      public static void spn_inhibiting() throws Exception
      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

      public static void spn_closed_twoplaces() throws Exception
      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

      public static void spn_closed_fourplaces() throws Exception
      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

      public static void spn_open_sevenplaces() throws Exception
      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

      public static void main(String[] args) throws Exception
      Main method demonstrating selected Petri net examples.
      Throws:
      Exception