#3786 closed defect (fixed)
FMU export generates an empty ModelStructure
Reported by: | Adrian Pop | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | blocker | Milestone: | 1.16.0 |
Component: | FMI | Version: | |
Keywords: | Cc: |
Description (last modified by )
When FMU exporting the attached model we get some elements in the ModelStructure but they are empty:
translateModelFMU(Driver,"2.0","cs"); getErrorString();
gets you:
<ModelStructure> <Outputs> </Outputs> <Derivatives> </Derivatives> <InitialUnknowns> </InitialUnknowns> </ModelStructure>
Attachments (1)
Change History (21)
by , 9 years ago
comment:1 by , 9 years ago
Description: | modified (diff) |
---|---|
Owner: | changed from | to
Status: | new → accepted |
comment:2 by , 9 years ago
comment:4 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:5 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
comment:6 by , 7 years ago
Owner: | changed from | to
---|---|
Priority: | high → blocker |
Status: | accepted → assigned |
@wbraun You stated in several OSMC dev meetings that you will also provide the missing information for initial unknowns, as requested in #4424. Therefore, I assign this ticket to you.
This missing part of the model description information is crucial. Can you please elaborate on the status and estimate when this can be tested?
follow-up: 8 comment:7 by , 7 years ago
In PR1938 I prepared an initial implementation for the detection of dependencies for the initialization.
The missing part is to filter the initialization BackendDAE for the relevant variables:
FMI spec page 60 (1) causality = "output" and ( initial="approx" or "calculated" ), and (2) causality = "calculatedParameter" and (3) all continuous-time states and all state derivatives (defined with element <Derivatives> from <ModelStructure> ) with initial="approx" or "calculated" [if a Co-Simulation FMU does not define the <Derivatives> element, (3) cannot be present.].
@lochel You know the initialization part best, so can you can fix this part.
follow-up: 9 comment:8 by , 7 years ago
Replying to wbraun:
In PR1938 I prepared an initial implementation for the detection of dependencies for the initialization.
@lochel You know the initialization part best, so can you can fix this part.
I cannot spend any time on this in, at least, the next weeks. There is also no connection to the actual implementation of the initialization, right? So I suggest that you just finish the PR, since you did already most of the work anyway. That would also save the work power needed to understand what you already did.
comment:9 by , 7 years ago
Replying to lochel:
Replying to wbraun:
In PR1938 I prepared an initial implementation for the detection of dependencies for the initialization.
@lochel You know the initialization part best, so can you can fix this part.
I cannot spend any time on this in, at least, the next weeks.
Me too :(, so let's split the work :).
Replying to lochel:
There is also no connection to the actual implementation of the initialization, right? So I suggest
that you just finish the PR, since you did already most of the work anyway. That would also save
the work power needed to understand what you already did.
Yes, I think there is a clear connection to the current implementation of the initialization, since we need to know, how specific variables are initialized:
FMI Spec, page 47 values for initial: • = " exact ": The variable is initialized with the start value (provided under Real , Integer , Boolean , String or Enumeration ). • = " approx ": The variable is an iteration variable of an algebraic loop and the iteration at initialization starts with the start value. • = " calculated ": The variable is calculated from other variables during initialization. It is not allowed to provide a “ start ” value.
So we need the crefs of the variables (states, states derivatives, outputs and parameters) with initial="approx" or initial="calculated"
and causality = "calculatedParameter"
at this
line. Collecting this information from the initBDAE should be quite easy for you, since I'm not that familiar with it.
comment:10 by , 7 years ago
Owner: | changed from | to
---|
Only the model structure for InitialUnknowns is left.
comment:11 by , 6 years ago
@lochel, do you think you can take care of this in time for the 1.13.0 release?
Thanks!
comment:12 by , 6 years ago
Milestone: | 1.13.0 → 1.14.0 |
---|
Milestone changed as discussed in today’s meeting.
comment:14 by , 5 years ago
@lochel, could you post an update on the status of this issue? PR1938 is still open, it would be good to go through it.
Thanks!
comment:15 by , 5 years ago
Milestone: | 1.14.0 → 1.15.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2.
This issue, previously marked as blocker for 1.14.0, is rescheduled to 1.15.0
comment:16 by , 5 years ago
Milestone: | 1.15.0 → 1.16.0 |
---|---|
Status: | assigned → accepted |
comment:17 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The ModelStructure is now generated correctly:
<ModelStructure> <Outputs> <Unknown index="1" dependencies="" dependenciesKind="" /> <Unknown index="9" dependencies="" dependenciesKind="" /> </Outputs> <InitialUnknowns> <Unknown index="1" dependencies="3 4 5 6" dependenciesKind="dependent dependent dependent dependent" /> <Unknown index="9" dependencies="2 10" dependenciesKind="dependent dependent" /> </InitialUnknowns> </ModelStructure>
follow-up: 19 comment:18 by , 5 years ago
@lochel, is it possible to backport this to 1.15.0 also?
Thanks!
comment:19 by , 5 years ago
Replying to casella:
@lochel, is it possible to backport this to 1.15.0 also?
This would require to pick all the related changes from the last 7 weeks. There are also known regressions that I have to fix first. I would rather like to not include the changes now in 1.15.0 and instead provide a strongly improved 1.16.0 release for all fmi related things.
comment:20 by , 5 years ago
Sounds good.
Maybe we could release a 1.16.0-dev.01 stable version at some point when you think we have reached a significantly improved situation, before the July release. That could be useful for people with FMI needs.
Partially fixed in f11f59c2012caedbe53899b220b65916e030edaf/OMCompiler
We have now the Outputs, still missing InitialUnknowns: