【发布时间】:2018-10-02 12:23:16
【问题描述】:
我有一个使用不同组件的仿真模型。为了快速了解使用的参数,我使用注释的功能来显示某些模型参数(例如 m_flow_nominal),方法是:
textString="Nominal Flow Rate = %m_flow_nominal"
在注释对话框中。 这会给出类似
标称流量 = 5
这对于整数参数非常有效。
我还有一个根据其他值计算的参数。就像,让我们说一个身体的体积。当我尝试通过以下方式显示此参数时:
textString="Volume = %volume"
我将给出计算体积的公式,而不是最终值。例如
音量 = a * b * c
在这种情况下如何显示体积的最终值,而不是公式?
这是实际的问题:
parameter Modelica.SIunits.Length xBorFie = 10 "Borefield length";
parameter Modelica.SIunits.Length yBorFie = 30 "Borefield width";
parameter Modelica.SIunits.Length dBorHol = 5 "Distance between two boreholes";
parameter Integer nXBorHol = integer((xBorFie+dBorHol)/dBorHol) "Number of boreholes in x-direction";
parameter Integer nYBorHol = integer((yBorFie+dBorHol)/dBorHol) "Number of boreholes in y-direction";
final parameter Integer nBorHol = nXBorHol*nYBorHol "Number of boreholes";
使用时
textString="Number of boreholes = %nBorHol"
我明白了
钻孔数 = nXBorHol*nYBorHol
【问题讨论】:
标签: parameters annotations dymola