Wolfram Computation Meets Knowledge

Simulation CenterInitialize from Experiment

To initialize the current experiment to the end state of another experiment, or itself, choose Tools Initialize From Experiment. This will bring up the Initialize from experiment dialog; select the desired experiment from which to initialize.

This will attempt to initialize the current experiment to the state at the last time instance of the selected experiment; whether it is possible or not depends on how the model is set up to be initialized. It is done by setting the start attribute for all variables and parameters that are initialized exactly by their start attribute or where the start attribute is used as a guess value. In general, it is not possible to directly influence the initialization of variables and parameters that are calculated during initialization. However, it is possible for the special case when the variable or parameter is calculated by a direct variable binding that in turn is initialized exactly by its start attribute or a binding literal value. So in the following example, x can be initialized by specifying a value for x_start, whereas the initialization of y cannot be influenced at all. For more information on initialization, see Model Initialization.

model InitializeFromExperiment
parameter Real x_start = 5.0;
Real x(start = x_start, fixed = true);

parameter Real y_start(fixed=false);
Real y(start = y_start, fixed = true);

initial equation
y_start = 5;
equation
der(x) = -x;
der(y) = -y;
end InitializeFromExperiment;

1.gif

The Initialize from experiment dialog.