Error parsing FMU file when it has Variable with no value
Try to parse out Controller_fmu_noWorking.fmu file and you get exception, it can not handle Variable that has no value.
Caused by: org.simpleframework.xml.core.ElementException: Element 'DiscreteStates' does not have a match in class org.javafmi.modeldescription.v2.ModelStructure at line 42
at org.simpleframework.xml.core.Composite.readElement(Composite.java:527) ~[simple-xml-safe-2.7.1.jar:2.7.1]
at org.simpleframework.xml.core.Composite.readElements(Composite.java:445) ~[simple-xml-safe-2.7.1.jar:2.7.1]
at org.simpleframework.xml.core.Composite.access$400(Composite.java:59) ~[simple-xml-safe-2.7.1.jar:2.7.1]
It should at least return values it can and not crash entire FMU parsing.
Comments (3)
-
-
reporter Yeah, was discreate state, was my bad about no value. Mixed up some FMU. Thanks, will take a look at FMU then, as we have few such FMU’s
-
- changed status to invalid
- Log in to comment
The error pointed out in the log you copy says that DiscreteStates is not a valid element inside Model Structure. Effectively the model description of your FMU is wrongly built. In the specs this is not valid. Here I have an extract of the definition:
I don’t see the log of the “Variable without value” that you mention. If you provide me with more information I can check.