python - PyFMI FMU 模块方法 get_variable_unit() 常量

标签 python fmi jmodelica

PyFMI FMU 模块方法 get_variable_unit() 不适用于常量。

在我看来,FMU 模具 get_variable_unit() 和 _variable_description 的 PyFMI 方法也处理常量和参数。

我制作了一个包含常量声明的包 M。尽量使其简洁并声明单位和描述。当我尝试 get_model_variable_unit('model.variable') 时,我收到错误消息“未找到该变量的单位...”。但是,它按 get_model_variable_description() 的预期工作。

在我看来这是一个小错误。

我运行秋季安装的 JModelica 2.4,即最近 12 月份发布的 PyFMI 升级到 2.5,我没有使用。

最佳答案

这确实是 JModelica.org 中的一个错误 - 请参阅 https://trac.jmodelica.org/ticket/5729 .

关于python - PyFMI FMU 模块方法 get_variable_unit() 常量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54292399/

相关文章:

python - 如何在Pycharm中使双下划线显示为两个单独的下划线?

python-3.x - 使用 pyFMI 模拟时出现 CVodeError

c++ - 智能感知 : a value of type "void *" cannot be assigned to an entity of type "char *"

interpolation - Modelica Block 中的多维表

python - 使用 PyFMI 进行灵敏度分析 - for-loop 中的 FMU

python - Python的随机性的随机性

python - `python file.py` 和 `python -m file` 之间的区别

linux - FMU 合规性检查器 : FMICAPI: undefined symbol: va_start (Linux)

modelica - 仅保存 JModelica 输出文件中的相关变量

python - OSX 如何将 Matplotlib 窗口置于最前面?