【发布时间】:2025-12-18 13:45:02
【问题描述】:
在我看来,以下简单的function 是完全合法的Modelica 代码:
function foo "Returns true"
input Boolean[:] x "Vector of booleans";
output Boolean y "= true, in any case here";
algorithm
y := true;
end foo;
在OpenModelica v1.16.2 (64-bit) 中使用Check Model 会引发错误:
[1] 15:15:11 Translation Error
[foo: 2:3-2:42]: Failed to deduce dimension 1 of x due to missing binding equation.
Modelica 代码有问题还是 OME 问题?
编辑
只是为了表明,这实际上不是一个明确的案例:
这是在 Wolfram System Modeler 12.2 中验证 foo 时得到的消息:
[3] 10:59 验证函数 foo
验证函数 foo 顺利完成。
【问题讨论】:
标签: modelica openmodelica systemmodeler