model Test
Real x;
initial equation
pre(x) = time - 10;
equation
when initial() then
x = time + 5;
elsewhen time>1 then
x = 1;
end when;
end Test;
This model can run in Dymola, but if the elsewhen branch is removed, Dymola will report redundant initial condition errors.
model Test
Real x;
initial equation
pre(x) = time - 10;
equation
when initial() then
x = time + 5;
end when;
end Test;
In my opinion, the initial equations of these two models are the same; both are pre(x) = time - 10 and x = time + 5.
I don't know why the results in Dymola are different. Also, does this situation count as redundant initial conditions?
I have seen many such cases in the third-party library Buildings.
This model can run in Dymola, but if the elsewhen branch is removed, Dymola will report redundant initial condition errors.
In my opinion, the initial equations of these two models are the same; both are
pre(x) = time - 10andx = time + 5.I don't know why the results in Dymola are different. Also, does this situation count as redundant initial conditions?
I have seen many such cases in the third-party library
Buildings.