Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.5 KB

File metadata and controls

36 lines (27 loc) · 1.5 KB

Stopping Condition Parameters

Stopping condition controls when the evaluation should be terminated. Unlike the event selection parameters, the termination occurs immediately once one of these conditions is reached, even if a further evaluation would be possible with a different event ordering.

StoppingConditionParameters allows one to obtain the list of parameters available for a particular system:

In[] := StoppingConditionParameters[MultisetSubstitutionSystem]
Out[] = {"MaxEvents"}

They typically correspond to the values returned by the TerminationReason property. These values can be used as keys for the corresponding arguments of generators.

MaxEvents

This is the most basic stopping condition. It stops the evaluation once the given number of events is reached (regardless of causal dependencies between these events):

In[] := #["ExpressionsEventsGraph"] & @
  SetReplaceTypeConvert[{WolframModelEvolutionObject, 2}] @
    GenerateMultihistory[MultisetSubstitutionSystem[{a_, b_} /; a < b :> {a + b}],
                         {"MaxEventInputs" -> 2},
                         None,
                         EventOrderingFunctions[MultisetSubstitutionSystem],
                         {"MaxEvents" -> 9}] @ {1, 2, 3, 4}

Compare to "MaxGeneration" which controls the depth of the evaluation instead.