Class Transition

All Implemented Interfaces:
Serializable, Cloneable, Copyable

public class Transition extends ServiceNode
Transition as in a stochastic Petri net model
See Also:
  • Field Details

  • Constructor Details

    • Transition

      public Transition(Network model, String nodeName)
  • Method Details

    • addMode

      public Mode addMode(String modename)
    • addMode

      public void addMode(Mode mode)
    • getFiringDistribution

      public Distribution getFiringDistribution(Mode m)
    • getModeNames

      public List<String> getModeNames()
    • getModes

      public List<Mode> getModes()
    • getNumberOfModeServers

      public Matrix getNumberOfModeServers()
    • getNumberOfModeServers

      public int getNumberOfModeServers(Mode m)
    • getNumberOfModes

      public int getNumberOfModes()
    • setDistribution

      public void setDistribution(Mode mode, Distribution distribution)
    • setFiringRateDependence

      public void setFiringRateDependence(Mode mode, SerializableFunction<Matrix,Double> g)
      Marking-dependent firing-rate multiplier for a timed mode. g(m) takes the node-indexed input-place marking matrix and returns a positive scalar; the effective firing rate of an enabled binding becomes rate_base(mode)*g(m). Exact only for memoryless firing, so the mode must be TIMED and exponentially distributed (mirrors the PS/FCFS-only station dependence).
    • getFiringRateDependence

      public SerializableFunction<Matrix,Double> getFiringRateDependence(Mode mode)
    • setFluidRate

      public void setFluidRate(Mode mode, Place place, double rate)
      Fluid flow of a TIMED mode into (rate > 0) or out of (rate < 0) the fluid place, per running server: while the marking keeps k servers of the mode running, the level moves at k*rate. For a single-server mode this is the classical FSPN rule "fluid flows while the transition is enabled". A flow stops at the place's bounds: an empty place supplies no outflow beyond its inflow, a full place admits no inflow beyond its outflow. A rate of 0 removes the arc.
    • setFluidGuard

      public void setFluidGuard(Mode mode, Place place, String op, double threshold)
      Enables the mode only while the level of the fluid place satisfies level op threshold, with op ">=" or "<=". A mode carries at most one guard per fluid place and all of them must hold. A null or empty op removes the guard.
    • setFluidImpulse

      public void setFluidImpulse(Mode mode, Place place, double delta)
      Every firing of the mode moves the level of the fluid place by delta at once (a deposit for delta > 0, a withdrawal for delta < 0). The jump is truncated at the place's bounds; the firing itself is never blocked. A delta of 0 removes the impulse.
    • setFluidRateDependence

      public void setFluidRateDependence(Mode mode, Place place, SerializableFunction<Double,Double> h)
      Fluid-dependent firing rate of a TIMED, exponentially distributed mode: its rate is multiplied by h(level), a non-negative function of the level of the fluid place. Several places multiply. A null h removes the dependence on the place. Memoryless firing is required for the same reason as in setFiringRateDependence(jline.lang.Mode, jline.util.SerializableFunction<jline.util.matrix.Matrix, java.lang.Double>).
    • setFluidFlowDependence

      public void setFluidFlowDependence(Mode mode, Place place, SerializableFunction<Matrix,Double> phi, List<Place> readPlaces)
      Marking-dependent fluid flow: the flow of the mode into or out of the fluid place becomes k*rate*phi(M), with k the running servers and rate the one set by setFluidRate(jline.lang.Mode, jline.lang.nodes.Place, double). phi is a function of the (nnodes x nclasses) marking matrix M returning a non-negative scalar, as for setFiringRateDependence(jline.lang.Mode, jline.util.SerializableFunction<jline.util.matrix.Matrix, java.lang.Double>). M carries the token places readPlaces and holds every other row at 0; with readPlaces null or empty it carries the input places of the mode, the marking setFiringRateDependence reads. A null phi removes the dependence.
    • setFluidFlowDependence

      public void setFluidFlowDependence(Mode mode, Place place, SerializableFunction<Matrix,Double> phi)
      Marking-dependent fluid flow reading the input places of the mode; see the four-argument form.
    • getFluidFlowDependence

      public List<FluidFlowDependence> getFluidFlowDependence(Mode mode)
      Returns:
      the marking-dependent flow multipliers of the mode
    • getFluidRates

      public Matrix getFluidRates(Mode mode)
      Returns:
      the (F x 2) flow rows [place node index, rate] of the mode
    • getFluidGuards

      public Matrix getFluidGuards(Mode mode)
      Returns:
      the (G x 3) guard rows [place node index, sgn, threshold] of the mode
    • getFluidImpulses

      public Matrix getFluidImpulses(Mode mode)
      Returns:
      the (F x 2) impulse rows [place node index, delta] of the mode
    • getFluidRateDependence

      public List<FluidRateDependence> getFluidRateDependence(Mode mode)
      Returns:
      the fluid rate dependences of the mode
    • hasFluidArcs

      public boolean hasFluidArcs()
      Returns:
      true when any mode declares a flow, guard, impulse, fluid rate or flow dependence
    • setEnablingConditions

      public void setEnablingConditions(Mode mode, JobClass jobclass, Place inputPlace, int enablingCondition)
    • setFiringOutcome

      public void setFiringOutcome(Mode mode, JobClass jobclass, Node node, int firingOutcome)
    • setFiringPriorities

      public void setFiringPriorities(Mode mode, int firingPriority)
    • setFiringWeights

      public void setFiringWeights(Mode mode, double firingWeight)
    • setInhibitingConditions

      public void setInhibitingConditions(Mode mode, JobClass jobclass, Place inputPlace, int inhibitingCondition)
    • setModeNames

      public void setModeNames(Mode mode, String modeName)
    • setNumberOfServers

      public void setNumberOfServers(Mode mode, Integer numberOfServers)
    • setTimingStrategy

      public void setTimingStrategy(Mode mode, TimingStrategy timingStrategy)