我真的在 Modelica 规范中找不到任何答案,所以请教你们。规范指出,
A tool is free to solve equations, reorder expressions and to not evaluate expressions if their values do not influence the result (e.g. short-circuit evaluation of Boolean expressions). If-statements and if-expressions guarantee that their clauses are only evaluated if the appropriate condition is true, but relational operators generating state or time events will during continuous integration have the value from the most recent event.
If a numeric operation overflows the result is undefined. For literals it is recommended to automatically convert the number to another type with greater precision.
现在,我想知道,该工具可以选择在积分器步骤中多次评估表达式吗?例如(可能不是一个有效的例子,只是为了让你们知道我想知道什么:))
Real x;
equation
der(x) = -t;
Modelica.Utilities.Streams.print(String(time));
这将多次打印同一时间,所以我认为正在进行某种迭代。但我真的很想得到一些消息来源的证实。