# Simulation preferences:

Simulation preferences allow to control specific behaviour of the simulation engine.

The preference screen allows to select two preset preference settings:*Default training settings* and *Default modelling settings*.

basic preferences | advanced preferences | expert preferences

## Basic preferences for running the simulator

**Assume unknown influence to be zero**

When evaluating the effects of influences and proportionalities unknown values (I’s) and derivatives (P’s) at the start of causal chains can prohibit the evaluation of their causal effects. This preference causes the reasoning engine to set influencing unknown values and/or derivatives to zero for all quantities that are themselves not influenced before starting the influence resolution procedure. In some cases this may conflict with later results of the influence resolution, causing a contradiction (via an inequality for instance). In this case the corresponding state is not generated.Default training setting:

*off*, Default modelling setting:*off***Apply quantity space constraints on extreme values**

Without quantity space constraints, quantities may keep increasing or decreasing in the extreme points (landmarks) of quantity spaces. This preference restricts the quantity behaviour such that increasing in the uppermost point of a quantity space is not possible and decreasing in the lowermost point of a quantity space is not possible. After changing this option, start with a new model to reset quantity spaces. Note that this preference does not affect behaviour at the ZERO point.Default training setting:

*off*, Default modelling setting:*on***Apply quantity space constraints on zero as extreme value**

This option prevents derivatives to keep increasing or decreasing in the highest or lowest point of a quantity space if this point is ZERO. After changing this option, start with a new model to reset quantity spaces.Default training setting:

*on*, Default modelling setting:*on***Generate all values for calculated quantities**

Magnitudes remain unknown unless fully specified by the model. (Unlike derivatives, which are branched and specified if they are ambiguous.) This preference activates an assumption mechanism that generates all magnitudes for ambiguous quantities. It acts in the following two situations:

-When the user specifies this behaviour for a quantity in the scenario.

-When a magnitude is determined by an addition or a subtraction that is ambiguous.

This mechanism ensures that quantity magnitudes do not remain unknown in a sparsely specified model and that the full behaviour is generated. Note that having many extra assumable magnitudes is a computational burden and therefore this preference is turned off by default.Default training setting:

*off*, Default modelling setting:*off***Apply Fastest Path Heuristic**

Simulations often have multiple paths to each end state. In many cases, these paths are practically very similar in the behaviour they represent: the same set of changes will occur. This option gives precedence to those transition scenarios that apply as many as possible of these terminations at once. If these transition scenarios produce a valid state then the transition scenarios that are ‘subsets’ are discarded.Default training setting:

*off*, Default modelling setting:*off***Apply epsilon ordering**

When quantities are moving, changes from a point and from equality happen instantly. This preference makes the reasoning engine work according to this logic. These kind of changes will happen before all other changes. (Which take at least some small epsilon of time.) In case of such an instant change, other non-instant changes are removed.Default training setting:

*on*, Default modelling setting:*on***Apply epsilon merging of immediate terminations**

Changes from a point and from equality happen instantly and therefore they should happen all at once. This preference groups all immediate terminations as much as possible (mutual exclusive terminations cannot be combined, e.g. random exogenous behaviours in opposite directions for the same quantity.).Default training setting:

*on*, Default modelling setting:*on***Apply epsilon derivative continuity constraints**

Changes from a point and from equality happen instantly and represent instantaneous transitions. Non-instant changes cannot occur in these transitions. A derivative becoming zero is such a non instant change and this event should not happen in an instantaneous transition. that is. This preference ensures that derivatives cannot become zero (no halting) during instantaneous transitions.Default training setting:

*on*, Default modelling setting:*on***Remove inactive quantities after transition**

This function removes any quantities that are no longer mentioned in the set of active model fragments. Typically this may be a quantity associated with a process, where the process stops and disappears.Default training setting:

*off*, Default modelling setting:*off*

## Advanced preferences for running the simulator

**Calculate 2nd order derivatives**

To correctly capture the behaviour of a system, 2nd order derivatives are sometimes needed. With this preference turned on, 2nd order derivatives are calculated by a procedure similar to the regular influence resolution. 2nd order derivatives can only be calculated if at least one direct influence is present in the causal chain to generate the first 2nd order derivative information using the derivative of the influencing quantity. Also, all of these influencing quantities must have a determined derivative.

For reasons of understandability and efficiency reasons, 2nd order functionality is switched off in training default.Default training setting:

*off*, Default modelling setting:*on***Assume unknown 2nd order influences to be zero**

When evaluating the second order effects of influences and proportionalities, this function firstly sets the (second order) derivative of all unaffected quantities to zero. (if these (second order) derivatives are unknown).Default training setting:

*off*, Default modelling setting:*off***Propagate 2nd order derivatives over proportionalities**

This preference causes 2nd order derivatives to be propagated over proportionalities. Note that this behaviour extends the assumptions made about the underlying function modelled by the proportionality beyond the normal definition proportionalities. In general the changes of the 1st order derivatives of the two related quantities can be unequal and therefore this preference is off even in default modelling settings.Default training setting:

*off*, Default modelling setting:*off***Generate derivative terminations (based on 2nd order derivatives)**

2nd order derivatives can cause 1st order derivatives to terminate when this preference is turned on. This behaviour can be necessary to correctly capture the behaviour of a system. For example an ambiguous 1st order derivative may become non-ambiguous and cause a dead-end (contradiction in successor states) in the simulation. E.g. a state where the quantity is increasing cannot change into a decreasing state without first becoming steady (continuity regime) via a separate termination.Default training setting:

*off*, Default modelling setting:*on***Apply 2nd order derivative continuity constraints**

When this preference is switched on, 2nd order derivatives are part of the continuity constraints for 1st order derivatives.Default training setting:

*off*, Default modelling setting:*on***Assume inequality terminations**

(was: Assume inequality terminations despite unknown derivatives) A binary equality like greater(q1, q2) will normally terminate only when it is known that their derivatives are unequal. With this preference switched on, the reasoning engine will assume unequal derivatives (constrained by relations that are known) and fire terminations accordingly.Default training setting:

*off*, Default modelling setting:*on***Assume value terminations**

A quantity will only move if it has a known derivative min or plus. With this preference switched on, the reasoning engine will assume unequal derivatives (constrained by relations that are known) and fire terminations accordingly.Default training setting:

*off*, Default modelling setting:*on***Terminate ambiguous derivatives**

This preference causes terminations for ambiguous derivatives to be generated such that these can freely change. Note that this can be important for correct behaviour. Ambiguous derivatives are always branched and specified (states are generated for each possibility). And without free transitions between such states, when a derivative becomes unambiguously known in a successor state, this may lead to a contradiction and a dead-end state because of continuity constraints (A change from plus directly to min and vice versa is not permitted.).Default training setting:

*off*, Default modelling setting:*on***Use correspondence in ordering**

Correspondences (for values) are a good information source for ordering terminations in the transition process. With this preference switched on terminations that do not fit the known correspondences in a state are removed thereby saving computational resources. In general, correspondences are valid throughout a simulation, but in models where correspondences change from state to state this preference should be turned off.Default training setting:

*on*, Default modelling setting:*on***Assume equal quantity spaces have equal points**

Different quantities may use a similar quantity space. Similar points on similar quantity spaces are not automatically considered equal however. E.g. maximum(A) is not necessarily equal to maximum(B). The exception to this rule is the ZERO point which is universal. This preference causes the reasoning engine to assume equality statements between all the similar points on quantity spaces of equal type.Default training setting:

*off*, Default modelling setting:*off*

## Expert preference for sunning the simulator

**Maximum Inequality Reasoning Depth**

This preference restricts the maximum search depth for (in-)equality resolution. Restricting the search depth can improve efficiency on complex models that take too long to compute. This of course carries the risk of not finding derivable relations. Search depth restrictions in the range of 10 to 20 have been used in the past, but new models are recommended to use restrictions determined using a conservative experimental approach.Default training setting:

*zero*, Default modelling setting:*zero***Calculate 3rd order derivatives**

In larger models, especially models with long chains of I-relations, 3rd order derivatives may become informative to system behaviour. For efficiency reasons, 3rd order derivatives are not calculated by default. This preference turns this behaviour on. Note that in general, calculation and propagation of 2nd order derivatives is needed for this functionality to have an effect.Default training setting:

*off*, Default modelling setting:*off***Assume unknown 3rd order influences to be zero**

When evaluating the third order effects of influences and proportionalities, this function firstly sets the (third order) derivative of all unaffected quantities to zero. (if these (third order) derivatives are unknown).Default training setting:

*off*, Default modelling setting:*off***Propagate 3rd order derivatives over proportionalities**

This preference causes 3rd order derivatives to be propagated over proportionalities. Note that this behaviour extends the assumptions made about the underlying function modelled by the proportionality beyond the normal definition proportionalities. In general the changes of the 2nd order derivatives of the two related quantities can be unequal and therefore this preference is off even in default modelling settings.Default training setting:

*off*, Default modelling setting:*off***Allow reasoning assumptions**

When computing a state from a transition or scenario, Model Fragments are considered. Model Fragments with conditions that are explicitly known are applied first. When this preference is switched on, the reasoning engine makes assumptions on conditions to include non-contradictory model fragments with conditions that are not explicitly known.Default training setting:

*on*, Default modelling setting:*on***Allow reasoning assumptions on derivatives**

When applying a transition, Model Fragments are reconsidered. Assumptions made in the previous state that are not contradictory at this point are kept. Assumptions about derivatives are not made at this point however, because these cannot be contradicted during the Model Fragment application procedure, since derivatives are set later on in the influence resolution procedure. As such Model Fragments might be incorrectly retained after a transition. With this preference switched on the reasoning engine will make assumptions on derivatives.Default training setting:

*on*, Default modelling setting:*on***Apply continuity on derivative inequalities**

The continuity regime in DynaLearn releases derivatives over state transitions under constraints to ensure continuous change. When this preference is switched on derivative inequalities are ‘weakened’ using a similar regime.Default training setting:

*on*, Default modelling setting:*on***Use constants in ordering**

This preference causes the reasoning engine to use relations labelled as constant and relations involving addition/subtraction (these are assumed constant) to order terminations in the transition process. Terminations not compatible with these constants are removed thereby gaining computational efficiency.Default training setting:

*on*, Default modelling setting:*on***Assume equal length intervals**

By default, the positions of points and thus the size of intervals is not defined. When this preference is switched on, the reasoning engine assumes all intervals within a quantity space to have equal length. This is done by adding the appropriate additions and subtractions expressing this knowledge.Default training setting:

*off*, Default modelling setting:*off***Generate terminations for >=&=<**

This preference causes terminations to be generated for the weak relations >= and =<. E.g. the relation >= will terminate to > in case of the left side rising relative to the right side or to = and then < in the opposite case.Default training setting:

*off*, Default modelling setting:*off***Extra thorough inequality reasoning**

For efficiency reasons, the reasoning engines applies certain heuristics to reduce the size of the search space. A very strong heuristic is to not allow inferences to be made on all combinations of relations but only on a subset of the relations.

This preference switches the use of this heuristic off.Default training setting:

*on*, Default modelling setting:*on***Remove terminations to unequal for full corresponding quantities**

Turn this function on to remove terminations from equal to unequal from the transitions for quantities that have a full correspondence.Default training setting:

*off*, Default modelling setting:*off***Constrain interaction between possible worlds (derive landmark relations)**

In the course of a simulation new inequality relations between landmark values may become derivable. With this function these relations are added to the state description to prevent simulation branches describing different possible worlds from interacting.Default training setting:

*off*, Default modelling setting:*off*