-
Notifications
You must be signed in to change notification settings - Fork 50
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
Follow-up to ticket #1007 #1013
Comments
We try to respond to all comments, but a new ticket is obviously more visible. Sorry that we missed your comment. I think the specification talks in this particular case about the exporting tool, and not the importing tool. However, it would be good to raise this issue in the FMI specification group. We can easily adapt our import if we get confirmation from the FMI specification group. The infinite loop will disappear once the following pull request is merged: OpenModelica/OpenModelica#7407 |
I think that the function should just return
Hard to tell what other importing tools are doing, but it could be that they simply don't use nominal values. But as @lochel said, please check with the FMI specification group. Our interpretation could of course be wrong. |
I discussed with @lochel and opened a ticket on the FMI standard: modelica/fmi-standard#1420 |
Thank you all for the answers. For OMS, in these cases, there are two options: either reject with an error or default the zero vaues to 1.0 with a warning. OM has chosen as a general rule to be very strigtly standard compliant, and I totally agree with this position. For FMI is a bit different, because the final user has not the possibility to fix the FMU (without risky tampering with xml). Moreover, An FMU returning 0 is a clear sign that the FMU author has not a value to give. However, as I said, I'll try also to contribute to fix the issue at its roots, getting Dassault systèmes involved. |
Thanks for your thoughts. I want OMSimulator to be strictly standard compliant. However, we can introduce a flag which changes the behavior to a warning with a default 1.0 nominal value. What do you think? |
It would be perfect for me! |
I've tested this morning with dev-247 and it works well. |
Description
Sorry for opening a new ticket on the same issue as #1007 , but I want to comment on that ticket, and I'm not sure that comments on closed tickets get read.
Moreover, the system does not enable me to reopen the ticket.
Ticket #1007 was closed because of
fmi2GetNominalsOfContinuousStates from FMI Specification 3.2.2.
This part of specification reads:
If the FMU does not have information about the nominal value of a continuous state i, a nominal value x_nominal[i] = 1.0 should be returned. Note that it is required that x_nominal[i] > 0.0
The first part of the sentence implies that an FMU can be without nominal values of a continuous state and in this case 1 must be assumed.
But, how the FMU tells the caller that it has not the nominal value of a continuous state? Maybe returning 0? In this case, it would be correct to set it to 1 in gru_ter, and the last part of the sentence would be interpreted that the returned nominal values must not be negative. This seems reasonable to me, even though the specification could have been clearer.
I say this also because I have hints that the fmu I included in ticket #1007 is formally correct:
Please note that in today's version the infinite loop is still there.
The text was updated successfully, but these errors were encountered: