Class MarkingCondition

java.lang.Object
org.oristool.petrinet.MarkingCondition

public abstract class MarkingCondition extends Object
A predicate on token counts.
  • Field Details

  • Constructor Details

    • MarkingCondition

      public MarkingCondition()
  • Method Details

    • getMarkingMatcherInstance

      public static final MarkingCondition getMarkingMatcherInstance(Marking... givenMarkings)
      Builds a marking condition that matches only one of the input markings.
      Parameters:
      givenMarkings - markings to match
      Returns:
      true a marking condition matching the input markings
    • getSubMarkingMatcherInstance

      public static final MarkingCondition getSubMarkingMatcherInstance(Marking subMarking)
      Builds a marking condition that matches those markings that include the same token counts for a subset of places.
      Parameters:
      subMarking - a marking
      Returns:
      a marking condition matching markings with a subset of token counts
    • evaluate

      public abstract boolean evaluate(Marking m)
      Checks whether the input marking satisfies the predicate encoded by this marking condition.
      Parameters:
      m - a marking
      Returns:
      true if the marking satisfies this marking condition
    • fromString

      public static MarkingCondition fromString(String expression)
      Parses a marking condition from a string.
      Parameters:
      expression - input string
      Returns:
      a marking condition object