Class PostUpdater

java.lang.Object
org.oristool.models.pn.PostUpdater
All Implemented Interfaces:
MarkingUpdater, TransitionFeature, Feature

public final class PostUpdater extends Object implements MarkingUpdater, TransitionFeature
Transition feature updating the marking after token additions/removals of a firing.
  • Constructor Details

    • PostUpdater

      public PostUpdater(String expression, PetriNet pn)
      Builds a marking updater from a string of update commands.

      The syntax used of update commands is: place1 = expr1; place2 = expr2; ... where place1, place2, ... are place names and expr1, 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 updates
      pn - the Petri net that place names refer to
  • Method Details