Tags and keywords
The Modelica By Example target code is:
The next example FirstOrderExperiment is skipped because:
model FirstOrderSteady
"First order equation with steady state initial condition"
Real x "State variable";
initial equation
der(x) = 0 "Initialize the system in steady state";
equation
der(x) = 1-x "Drives value of x toward 1.0";
end FirstOrderSteady;
The exported Modelica code is:
model FirstOrderSteady
Real x;
Real y(start=0.0,fixed=true);
equation
der(x)=1-x;
y=der(x);
end FirstOrderSteady;
The SysPhS version as formulated here is quite different from the Modelica By Example version because:
The SysPhS version gets around the lack of 'initial equation' here by using an additional y = der(x)
and setting the 'start' for y
.
The next example FirstOrderExperiment is skipped because: