Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.98 KB

File metadata and controls

43 lines (33 loc) · 1.98 KB

MaxDestroyerEvents

MaxDestroyerEvents is an event-selection parameter that controls the number of inconsistent events allowed to take the same token as an input. GenerateSingleHistory limits the evaluation to a single history by setting MaxDestroyerEvents to one.

In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
  SetReplaceTypeConvert[WolframModelEvolutionObject] @
    GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 1] @ {1, 2, 3}

Out[] = Graph[... {1, 2} -> {3 (* gen 1 *)}, {3 (* init *), 3 (* gen 1 *)} -> 6 ...]

If unset (which defaults to Infinity), it will generate a full multihistory object subject to other selection and stopping parameters:

In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
  SetReplaceTypeConvert[WolframModelEvolutionObject] @
    GenerateMultihistory[
      MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> Infinity, MaxGeneration -> 1] @ {1, 2, 3}

Out[] = Graph[... {1, 2} -> {3 (* 1 + 2 *)}, {2, 1} -> {3 (* 2 + 1 *)}, {1, 3 (* init *)} -> {4}, <<3>> ...]

If set to a finite number, it will generate a partial multihistory:

In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
  SetReplaceTypeConvert[WolframModelEvolutionObject] @
    GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}], MaxDestroyerEvents -> 5] @ {1, 2, 3}

Out[] = Graph[... token-event graph containing tokens with out degrees up to 5 ...]

Note that results generally depend on the event order in this case, similar to single histories.