Open henrikt-ma opened 4 years ago
Note that MSL has external object declared with parameter-variability following https://github.com/modelica/ModelicaStandardLibrary/commit/48af06d62a2c0068d6407cdb2db2791e646f42ef That ensures that the external object constructor is only called with parameter-arguments.
Note that MSL has external object declared with parameter-variability following modelica/ModelicaStandardLibrary@48af06d That ensures that the external object constructor is only called with parameter-arguments.
That sounds like they've done a workaround (safeguard) for a potential pitfall in the specification.
Note that MSL has external object declared with parameter-variability following modelica/ModelicaStandardLibrary@48af06d That ensures that the external object constructor is only called with parameter-arguments.
That sounds like they've done a workaround (safeguard) for a potential pitfall in the specification.
Note that additionally the table doesn't change during the simulation.
There can also be external-objects that you "write" to - in which case declaring them as "parameter" doesn't seem right.
Considering such external objects I would say that it is natural that the constructor is part of the initial section, but not that the argument must be parameters (as you can anyway change the external object later).
Maybe it's best to postpone this issue while waiting for the resolution of #2602?
It seems strange that an external object constructor is allowed to be called with non-parameter arguments, considering that the function call won't be evaluated again after initialization.
Ways of addressing this include: