Package jline.api.sn

Class SnPnFiringRates

java.lang.Object
jline.api.sn.SnPnFiringRates

public final class SnPnFiringRates extends Object
Recovers per-mode transition firing rates from the Place throughputs. The firing rates of a Petri net are not carried by the network structure, but they are determined by the Place throughputs together with the net structure. Writing x for the vector of per-mode firing rates, two families of equations hold at steady state, for every Place p and class k:
  • departure: the sum over the modes consuming (p,k) of x, weighted by the input arc multiplicity when tputIsTokens is true and unweighted when it is false, equals TN(p,k)
  • balance: the sum over all modes of x times (produced minus consumed) equals zero
The system is solved in least squares. That is deliberate: an exact solver supplies throughputs that satisfy it exactly and the fit is then the exact answer, whereas a simulator supplies estimates that satisfy it only up to sampling error and the least-squares fit is the right estimator there. A residual test would reject every simulated run. Port of matlab/src/api/sn/sn_pn_firing_rates.m
  • Method Details

    • snPnFiringRates

      public static SnPnFiringRates.Ret snPnFiringRates(NetworkStruct sn, Matrix TN, boolean tputIsTokens)
      Recovers the per-mode firing rates from the Place throughputs.
      Parameters:
      sn - network structure
      TN - average throughputs at stations
      tputIsTokens - true when TN counts tokens, false when it counts firing events
      Returns:
      the recovery outcome, with a null rates field when undetermined