Package org.oristool.petrinet
Class MarkingCondition
java.lang.Object
org.oristool.petrinet.MarkingCondition
A predicate on token counts.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Checks whether the input marking satisfies the predicate encoded by this marking condition.static MarkingCondition
fromString
(String expression) Parses a marking condition from a string.static final MarkingCondition
getMarkingMatcherInstance
(Marking... givenMarkings) Builds a marking condition that matches only one of the input markings.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.
-
Field Details
-
ANY
-
NONE
-
-
Constructor Details
-
MarkingCondition
public MarkingCondition()
-
-
Method Details
-
getMarkingMatcherInstance
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
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
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
Parses a marking condition from a string.- Parameters:
expression
- input string- Returns:
- a marking condition object
-