A transition of a Petri net.
guard and action are used only by the executor; analysis ignores both.
guardreceives the tokens the transition would consume, as a map of input place to list of tokens, and returns a boolean.nilmeans always true.actionreceives the same map and returns the tokens to produce, as a map of output place to list of tokens.nilmeans produce:tokenonce per unit of arc weight in every output place.
Summary
Types
@type t() :: %Petrex.Transition{ action: (tokens_by_place() -> tokens_by_place()) | nil, extra: Petrex.Place.extra(), guard: (tokens_by_place() -> boolean()) | nil, id: id(), name: String.t() | nil }
@type tokens_by_place() :: %{required(Petrex.Place.id()) => [term()]}