"EdgeGenerationsList" (aka "ExpressionGenerations") yields the list of generation numbers (numbers of
predecessor layers) for each edge in "AllEventsEdgesList":
In[] := WolframModel[{{1, 2}, {1, 3}, {1, 4}} ->
{{2, 2}, {3, 2}, {3, 4}, {3, 5}},
{{1, 1}, {1, 1}, {1, 1}}, 5, "EdgeGenerationsList"]
Out[] = {0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5,
5, 5, 5, 5}"AllEventsGenerationsList" (aka "EventGenerations") gives the same for events. The generation of an event is
defined as the generation of edges it produces as output. Here edges of different generations are colored differently:
In[] := With[{
evolution = WolframModel[{{1, 2}, {1, 3}, {1, 4}} ->
{{2, 2}, {3, 2}, {3, 4}, {3, 5}},
{{1, 1}, {1, 1}, {1, 1}}, 5]},
MapThread[
HypergraphPlot[#, EdgeStyle -> #2] &, {evolution["StatesList"],
Replace[evolution[
"EdgeGenerationsList"][[#]] & /@ (evolution[
"StateEdgeIndicesAfterEvent", #] &) /@
Prepend[0] @ Accumulate @ evolution["GenerationEventsCountList"],
g_ :> ColorData["Rainbow"][g/5], {2}]}]]Event and expression generations correspond to layers in "LayeredCausalGraph"
and "ExpressionsEventsGraph":
In[] := WolframModel[{{1, 2}, {1, 3}, {1, 4}} ->
{{2, 2}, {3, 2}, {3, 4}, {3, 5}},
{{1, 1}, {1, 1}, {1, 1}}, 5, "AllEventsGenerationsList"]
Out[] = {1, 2, 3, 4, 5, 5}In[] := WolframModel[{{1, 2}, {1, 3}, {1, 4}} ->
{{2, 2}, {3, 2}, {3, 4}, {3, 5}},
{{1, 1}, {1, 1}, {1, 1}}, 5, "LayeredCausalGraph"]![Out[] = {
... 6 hypergraph plots showing edges of multiple generations in the same state starting from the 3rd plot ...
}](/maxitg/SetReplace/raw/7b4fabdc33857213970323e2e94d4b9fefdf46ed/Documentation/Images/GenerationColoredStatePlots.png)
![Out[] = ... causal graph showing 5 generations, some edges cross multiple generations, e.g., 1 -> 3 ...](/maxitg/SetReplace/raw/7b4fabdc33857213970323e2e94d4b9fefdf46ed/Documentation/Images/HypergraphModelLayeredCausalGraph.png)