Class Transition

java.lang.Object
jline.lang.lal.Transition
All Implemented Interfaces:
Serializable

public final class Transition extends Object implements Serializable
One local transition of a LAL agent: source --(action, role, value)--> target (Python core.Transition).

The role is active (the value is a rate), passive (a positive weight among the enabled reactions) or immediate (a positive weight of a zero-time action). The value may be functional, a ToDoubleFunction of the joint-state StateView. priority orders immediate actions and the timed actions of one agent. labels are user aliases of the event label; a transition with several labels credits one firing to each.

See Also:
  • Field Details

  • Constructor Details

    • Transition

      public Transition(String source, String action, String role, double value, String target)
    • Transition

      public Transition(String source, String action, String role, double value, ToDoubleFunction<StateView> function, String target, int priority, List<String> labels)
      Parameters:
      value - constant rate or weight (ignored when function is given)
      function - functional rate or weight, or null
      priority - immediate (or timed, per agent) priority; higher fires first
      labels - event label aliases, or null for agent.action
  • Method Details

    • getSource

      public String getSource()
    • getAction

      public String getAction()
    • getRole

      public String getRole()
    • getValue

      public double getValue()
      The constant rate or weight; NaN for a functional value.
    • getFunction

      public ToDoubleFunction<StateView> getFunction()
      The functional rate or weight, or null.
    • isFunctional

      public boolean isFunctional()
    • getTarget

      public String getTarget()
    • getPriority

      public int getPriority()
    • getLabels

      public List<String> getLabels()
      Label aliases, or null when the event is labelled agent.action.
    • isMultiLabel

      public boolean isMultiLabel()
      True when the transition carries more than one label.
    • isActive

      public boolean isActive()
    • isPassive

      public boolean isPassive()
    • isImmediate

      public boolean isImmediate()
    • value

      public double value(StateView view)
      The rate or weight in a joint state (Python core._value).
    • primaryLabel

      public String primaryLabel(String agentName)
      Primary event label: the first alias, else agent.action.
    • eventLabels

      public List<String> eventLabels(String agentName)
      All event labels: each alias, else agent.action.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object