-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are discrete inputs allowed in Modelica? #3527
Comments
That is correct.
The "discrete" have different meaning. Modelica is (in contrast to FMU) a language where you combine different models - this means that we need to consider how a model works as a sub-model and as a base-class etc. Enforcing that a variable is "discrete" in all those cases would require additional rules that are complicated to get right - and without those rules different tools would interpret "discrete" differently. The better solution would be to remove "discrete" in the Modelica Language - as it isn't really needed The goal in Modelica is instead that the same sub-model (such as add-block) can be used in continuous time and clocked.
If you just remove "discrete" it can be exported as an FMU.
Likely an improvement. |
Thanks @HansOlsson, then as far I understand, there is no benefit in any case to declare a "discrete input" into Modelica. |
I don't share the desire to eliminate I have long desired that Regarding blocks that can operate both in discrete-time and non-discrete-time, my claim is that the missing feature in Modelica is the ability to use a function as a block. This would both fill the gap of not having a way to express that a block in Modelica does not contain stateful dynamics, and allow us to take advantage of the variability rules for function calls when making block-oriented models. |
Follow-up of ticket OpenModelica/OpenModelica#12531 by @BasilioPV. Consider the following MWE:
As I understand, this model is not legal in Modelica because of the provision in Sect. 4.5.3:
On the other hand, the FMI 2.0.4 standard explicitly allows the
discrete input
combination.In view of the MA supporting open coordinated standards, could we amend the MLS to make this model legal, so it could be exported as an FMU?
BTW,
looks very German to me, shouldn't it better be
The text was updated successfully, but these errors were encountered: