有时无法在 Dymola 仿真选项卡和 FMU 中编辑参数 [英] Parameters Sometimes Not Editable in Dymola Simulation Tab and FMU
本文介绍了有时无法在 Dymola 仿真选项卡和 FMU 中编辑参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
示例:
您创建了一个模型,其中包含 9 个您希望在模拟"选项卡中可编辑且用户可在 FMU 中设置的参数.
You create a model with 9 parameters you expect to be editable in the Simulation tab and user-settable in the FMU.
然而,
- 在模拟"选项卡中似乎只有 5 个参数是可编辑的.
- 同样,FMU 只有 5 个用户可设置的参数.
推荐答案
解决方案:
为了生成更高效的代码,Dymola 有时会评估"参数.
To generate more efficient code, Dymola sometimes "evaluates" parameters.
annotation(Evaluate=false)
告诉 Dymola 一个参数不应该被评估.
annotation(Evaluate=false)
tells Dymola a parameter should not be evaluated.
示例:
parameter Real theAnswer = 42.0 "The answer to life,…" annotation(Evaluate=false);
Dymola 现在允许在模拟"选项卡中编辑 theAnswer
,并允许用户在 FMU 中设置.
Dymola will now allow theAnswer
to be edited in the Simulation tab and be user-settable in the FMU.
这篇关于有时无法在 Dymola 仿真选项卡和 FMU 中编辑参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文