本文介绍了使用python进行Modelica参数研究的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用python在不同的modelica建筑库(buildings、IDEAS)中运行参数研究:例如:改变渗透率.

I want to run parameter studies in different modelica building libraries (buildings, IDEAS) with python: For example: change the infiltration rate.

我试过:模拟模型和模拟扩展模型(..."zone.n50", [value])我的问题:为什么不能翻译模型然后更改参数:警告:设置 zone.n50 对模型没有影响.翻译后,您只能设置文字起始值和非求值参数.

I tried: simulateModel and simulateExtendedModel(..."zone.n50", [value])My questions:Why is it not possible to translate the model and then change the parameter: Warning: Setting zone.n50 has no effect in model. After translation you can only set literal start-values and non-evaluated parameters.

也无法运行:simulateExtendedModel.当我在 dymola 中进入命令行并为 zone.n50 写入时,我得到了实际值(我在 python 中定义的),但在结果文件(和绘制的变量)中,它始终是标准的 n50 值.所以我的问题:如何更改值(在运行(和翻译?)模拟之前?参数值在变量浏览器中也不可见.

It is also not possible to run: simulateExtendedModel. When i go to command line in dymola and write for zone.n50, then i get the actual value (that i have defined in python), but in the result file (and the plotted variable) it is always the standard n50 value.So my question: How can I change values ( befor running (and translating?) the simulation?The value for the parameter is also not visible in the variable browser.

亲切的问候

推荐答案

它可能是一个结构参数,这些也被评估.如果您为要研究的参数明确设置 Evaluate=False ,它应该可以工作.它在变量浏览器中是不可见的还是只是变灰并保持不变?如果它根本不可见,您应该检查它是否被protected.

It might be a strcutrual parameter, these are evaluated also. It should work if you explicitly set Evaluate=False for the parameter that you want to study.Is it not visible in the variable browser or is it just greyed out and constant? If it is not visible at all you should check if it is protected.

这篇关于使用python进行Modelica参数研究的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 16:05