刚开始使用Modelica并且无法理解它是如何工作的.
在模型的下面'方法'中,qInflow和qOutflow在第二行中用于评估der(h),但它们还没有收到值!(它们没有在方法的"数据"中定义)?代码的执行顺序是什么.
equation
assert(minV >= 0, "minV must be greater or equal to zero");
der(h)=(qInflow - qOutflow)/area;
qInflow=if time > 150 then 3*flowLevel else flowLevel;
qOutflow=Functions.LimitValue(minV, maxV, -flowGain*outCtr);
error=ref - h;
der(x)=error/T;
outCtr=K*(error + x);
end FlatTank;
Run Code Online (Sandbox Code Playgroud)
来自http://www.mathcore.com/resources/documents/ie_tank_system.pdf
modelica ×1