Class AfterGlobalEvent

java.lang.Object
jline.lang.state.AfterGlobalEvent
All Implemented Interfaces:
Serializable

public class AfterGlobalEvent extends Object implements Serializable
See Also:
  • Constructor Details

    • AfterGlobalEvent

      public AfterGlobalEvent()
  • Method Details

    • afterGlobalEvent

      public static AfterGlobalEvent.AfterGlobalEventResult afterGlobalEvent(NetworkStruct sn, int ind, List<Matrix> glspace, GlobalSync glevent, boolean isSimulation)
      Processes a global event in a Stochastic Petri Net (SPN) and computes the resulting state space. This is the main entry point for handling global synchronization events in SPN models, particularly for transition firings that affect multiple places simultaneously. The method orchestrates the complete event processing workflow including both ENABLE and FIRE phases of transition execution.

      The method handles two main types of global events:

      • ENABLE events: Check if transitions can be enabled based on token availability in input places and generate all possible enabling combinations
      • FIRE events: Execute transition firings, consume tokens from input places, produce tokens in output places, and update server/phase states

      For simulation mode, the method supports stochastic selection of outcomes when multiple firing possibilities exist, using proper probability distributions for realistic behavior.

      Parameters:
      sn - Network structure containing the complete SPN model definition including nodes, arcs, job classes, and transition parameters
      ind - Node index of the transition being processed (must be a Transition node)
      glspace - Global state space represented as a list of state matrices, one for each stateful node in the network (places and transitions with servers)
      glevent - Global synchronization event containing active events (the main transition firing) and passive events (input/output place interactions)
      isSimulation - If true, enables stochastic selection for simulation; if false, returns all possible outcomes for analytical computation
      Returns:
      AfterGlobalEventResult containing:
      • outglspace: Updated global state space after event processing
      • outrates: Transition rates for each resulting state
      • outprobs: Probabilities for each resulting state transition
      Throws:
      IllegalArgumentException - if the node is not a valid transition or if the global event structure is malformed
      IllegalStateException - if the transition cannot be enabled or fired from the current state
      See Also: