-
Notifications
You must be signed in to change notification settings - Fork 85
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
Clarify meaning of DefaultExperiment.stepSize for Model Exchange #1980
Conversation
Proposal by @KarlWernersson:
|
Poll at the Design Meeting:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess not updated,
Did we decide to go with the poll?
In that case
chachge to
For Model Exchange and scheduled execution, step size do not have a defined meaning.
I'm sorry I could not participate to the phone meeting and the poll. I still see an open issue with the taken decision. Assume that you build some system model in Modelica and simulate it satisfactorily with a variable step-size solver and a certain communication interval. You then make an FMU and ship it to a third party, that will simulate it in its own simulation environment using FMI-ME. If we say that stepSize has no definite meaning, this means that the information about what could be a meaningful default communication interval is lost, and has to be guessed. What's the point of doing that? We are currently testing OpenModelica's FMI generation by simulating all runnable models in open-source libraries using FMI-ME and FMPy using CVODE, which is a reasonable general-purpose algorithm also suitable for stiff systems. We observed that picking the right communication interval is sometimes crucial for simulation success or failure, so we are currently setting the stepSize attribute to the Interval experiment annotation valuen when generating the FMU, so we can later retrieve it when simulating the FMUs. With this new definition, this will no longer work for FMUs generated by other tools. Again, what is the advantage of losing this information in this scenario? I only see dis-advantages. Thanks |
Of course I would be perfectly fine if another attribute was added to specify the communication interval in FMI-CS mode. If that was the intention of this PR, I'm 100% happy about it. |
Hi @casella : I do not get your point. Do you talk about ME or CS FMUs? For CS FMUs nothing has changed, the FMI 3.0.2 standard still will tell "stepSize defines the preferred communicationStepSize for Co-Simulation." |
Sorry, I meant ME where I wrote CS. I just edited my original post. |
The problem is, that this was never defined. Perhaps FMI-LS-REF is the right place to clearly define what you want, perhaps add it the "experiment section" https://modelica.github.io/fmi-ls-ref/main/#_experiment_setup |
True, bu I think it should, see below.
Of course it is. Section 18.4
Maybe it's not formally defined as "communication interval" and there is no explicit reference to using dense output to resample the outcome of variable step-size solvers, but I'd say the concept is quite clear.
This could be done, but the intent of my comment is to define a default experiment, not a generic named experiment among others. I understand that Modelica and FMI are independent standard with different purposes, but I also understand they should be coordinated. Now, the description of the Modelica experiment annotation is:
which I understand is exactly the purpose of the Why not having the same concepts in the two places? I don't really see the point of having the two standards deliberately differing. Of course the right thing to do would not to interpret stepSize as Interval for FMI-ME, this actually causes confusion. I would just add an If you think this is worth discussing, I can open a separate issue for that. Thanks! |
@casella : Yes please to so.
Adding an additional attribute is not possible in a maintenance release FMI 3.0.x, and a minor relesae FMI 3.1 is not scheduled currently. |
@casella: I voted to state, that the stepSize has no meaning in ME. If you consider an ode with complex eigenvalues at In my opinion specifying a stepSize |
fixes #1939