Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.66 KB

File metadata and controls

42 lines (33 loc) · 1.66 KB

MultiwayQ

"MultiwayQ" checks if a given evolution contains multiway branching, i.e., there is an expression used in multiple events.

In[] := EchoFunction[#["ExpressionsEventsGraph"] &][
  WolframModel[{{1, 2}, {2, 3}} -> {{1, 2}, {2, 3}, {3, 4}},
               {{1, 2}, {2, 3}, {3, 4}},
               1,
               "EventSelectionFunction" -> "MultiwaySpacelike"]]["MultiwayQ"]

>> ...
{{1, 2} (* init *), {2, 3} (* init *)} -> {{1, 2} (* from event 1 *), {2, 3} (* from event 1 *), {3, 5}},
{{2, 3} (* init *), {3, 4} (* init *)} -> {{2, 3} (* from event 2 *), {3, 4} (* from event 2 *), {4, 6}}
...

Out[] = True

Note that even if "EventSelectionFunction" is set to allow multiway branching, the system might still be singleway if no overlapping matches occurred:

In[] := EchoFunction[#["ExpressionsEventsGraph"] &][WolframModel[
  {{1, 2}} -> {{1, 3}, {3, 2}}, {{1, 1}}, 2, "EventSelectionFunction" -> "MultiwaySpacelike"]]["MultiwayQ"]

>> ... {{1, 1}} -> {{1, 2}, {2, 1}}, {{1, 2}} -> {{1, 3}, {3, 2}}, {{2, 1}} -> {{2, 4}, {4, 1}} ...

Out[] = False