Skip to content

EXPERIMENT🔗

When you press the PLAY button in Impact, Impact runs always an Experiment. An Experiment can be thought of as a layer on top of the active model containing experiment values displayed in the Experiment tab.

An Experiment "calls" a Custom Function, meaning that the Experiment setting defines, which kind of simulation/analysis is executed (Dynamic, Steady-State, etc).

Simulation Models🔗

It's only possible to run and define Experiments for simulation models. As defined in the Modelica language specification, simulation models are - models, - blocks, and - classes.

All without declaration prefixes like partial or replaceable.

Inheritance🔗

Experiments are inherited. If you extend a given simulation model, which has Experiments, then these Experiments are also available for the child classes.


Note

Depending on how the child class has been modified in comparison to the parent class, it may happen that the Experiments of the parent class no longer work completely. For example, if new components that require customized solver configurations are used.


Default Experiment🔗

There must be always one Experiment marked as default. If no Experiment is selected (e.g. when you are in Modeling mode, this default Experiment is executed when pressing the PLAY button).

If your simulation model inherits Experiments from a parent class, then it takes the default Experiment from there.
If you create a further Experiment in the child class, then this child class Experiment is set as the new default Experiment.

Default Settings🔗

When you open a simulation model, that does not have a predefined Experiment, Impact will generate a "virtual" Experiment, to ensure that you can immediately run a Dynamic simulation.

As soon as you change something in the virtual Experiment, it will be stored as a file (e.g., changing the stop time or the Custom Function).

The automatically created virtual Experiment or a newly created Experiment has preset values, e.g. for the start or stop time. Where do these values come from?

Modelon Impact first tries to read these values from the Simulation model, more precisely from the experiment annotation in the Modelica source code.

If there are no values there, Impact retrieves the default values from the Custom Function that is selected in the Experiment.

By default, Dynamic simulation in the time domain (a Custom Function) is always set initially.

So, when a new Experiment is created, the default values will be read first from the model and second from the Custom Function.
If you "reset" an Experiment, its value modifications are reset to the default values given by the model or Custom Function.

Storing Experiments🔗

Experiments are always created on top of both, editable and read-only models. They are stored as separate JSON files in Projects.
For editable models, Experiments are saved in the same Project as the model.
For read-only models, Experiments are saved in the "Default Project".
Further information about the data storage model can be found in chapter Workspace.


Note

Undo and Redo operations are not supported for creating/deleting experiments.


Simulation🔗

When the model is simulated, settings and parameters will be taken from both, the model and the Experiment. Parameters in the Experiment take priority! This means that any Experiment values will replace the underlying values in the model.
Modifying a parameter in Experimentation mode will not change anything in the original Modelica source of the model!

Experimentation Mode🔗

The Experimentation mode is used when you want to create an Experiment using a particular analysis with certain settings and/or make changes to model parameters that are not necessary to be saved in the model artifact itself.