Package org.oristool.models.pn
Class PostUpdater
java.lang.Object
org.oristool.models.pn.PostUpdater
- All Implemented Interfaces:
MarkingUpdater
,TransitionFeature
,Feature
Transition feature updating the marking after token additions/removals of a
firing.
-
Constructor Summary
ConstructorDescriptionPostUpdater
(String expression, PetriNet pn) Builds a marking updater from a string of update commands. -
Method Summary
-
Constructor Details
-
PostUpdater
Builds a marking updater from a string of update commands.The syntax used of update commands is:
place1 = expr1; place2 = expr2; ...
whereplace1
,place2
, ... are place names andexpr1
,expr2
, ... are arbitrary expressions of using place names as variables. For example:p1 = p1 + p2 + max(p3, p4);
p1 = If(p2 > p3, p4, p5);
Note that all expressions are evaluated before updating the marking, using the current token counts.
- Parameters:
expression
- the sequence of marking updatespn
- the Petri net that place names refer to
-
-
Method Details
-
update
Description copied from interface:MarkingUpdater
Updates the input marking after the firing of the given transition.- Specified by:
update
in interfaceMarkingUpdater
- Parameters:
m
- markingpetriNet
- Petri nett
- fired transition
-
toString
-