Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.97 KB

File metadata and controls

39 lines (30 loc) · 1.97 KB

GenerateMultihistory

GenerateMultihistory is the most verbose and configurable generator. It can create both single histories, full multihistories, as well as partial ones. It, however, requires one to specify all groups of parameters (system, event selection, deduplication, event ordering and stopping conditions), nothing is implied automatically:

GenerateMultihistory[
  system, eventSelectionSpec, tokenDeduplicationSpec, eventOrderingSpec, stoppingConditionSpec] @ init

For example, for a MultisetSubstitutionSystem:

In[] := multihistory = GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} :> {a + b}],
                                            {"MaxDestroyerEvents" -> 3},
                                            None,
                                            EventOrderingFunctions[MultisetSubstitutionSystem],
                                            {"MaxEvents" -> 10}] @ {1, 2, 3, 4}

In[] := #["ExpressionsEventsGraph", VertexLabels -> Placed[Automatic, After]] & @
  SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @ multihistory

Everything that can be generated with more specialized GenerateSingleHistory and GenerateFullMultihistory can be reproduced with GenerateMultihistory as well. This can be done by setting "MaxDestroyerEvents" -> 1 to emulate GenerateSingleHistory and setting "MaxDestroyerEvents" -> Infinity and leaving the stopping condition empty to emulate GenerateFullMultihistory.

However, by setting "MaxDestroyerEvents" to finite values larger than 1, one can generate multihistories not possible with other generators.