What is the value of y in the simulation of this model?
model DelayInitialization
Real x(start = 1.0, fixed = true);
Real y = delay(x, 5.0);
discrete Real z;
initial equation
z = y;
equation
der(x) = 0.0;
when not initial() then
reinit(x, 2.0);
end when;
when false then
z = 0.0;
end when;
annotation(experiment(StopTime = 1.0));
end DelayInitialization;
In System Modeler, the value is 1.0, but it could be argued that the specification says it should be 2.0.
The reason I also included z in the model is to highlight that we at least need to make the interpretation that x(0.0) actually simplifies to x in the initialization problem, and for me it would seem natural that this value is also the value used to initialize the delay buffer.
What is the value of x in other tools?
What is the value of
yin the simulation of this model?In System Modeler, the value is 1.0, but it could be argued that the specification says it should be 2.0.
The reason I also included
zin the model is to highlight that we at least need to make the interpretation thatx(0.0)actually simplifies toxin the initialization problem, and for me it would seem natural that this value is also the value used to initialize the delay buffer.What is the value of
xin other tools?