在我看来,以下简单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;
使用Check Model
inOpenModelica v1.16.2 (64-bit)
会引发错误:
[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 问题?
编辑
只是为了表明,这实际上不是一个明确的案例:
这是foo
在 Wolfram System Modeler 12.2 中验证时得到的消息:
[3] 10:59 验证函数 foo
验证函数 foo 成功完成。