Opened 5 years ago

Closed 5 years ago

#5845 closed defect (fixed)

FMU export not creating UnitDefinitions section in ModelDescription.xml

Reported by: Chad Owned by: Lennart Ochel
Priority: blocker Milestone: 1.16.0
Component: FMI Version:
Keywords: UnitDescription Cc:

Description

See https://github.com/CATIA-Systems/FMPy/issues/113

When I export an FMU and then try to open it using FMPy, it gives me this warning:

Exception: The unit "A" of variable "ground.p.i" (line 100) is not defined.

Removing all the units from all the variables fixes this, or I can write my own UnitDefinitions section. This should be a thing that automatically works. If there won't be an imminent fix, I may write a python script that uses regular expressions to generate a list of all the units and then puts all the unique values in the UnitDescription section.

Change History (5)

comment:1 by Francesco Casella, 5 years ago

Milestone: Future1.16.0
Priority: highblocker

We are currently trying to improve FMI export, this should be an easy fix.

@lochel, can you please comment on that?

comment:2 by Francesco Casella, 5 years ago

Summary: FMU export not creating UnitDefinitions section in ModelDescirption.xmlFMU export not creating UnitDefinitions section in ModelDescription.xml

comment:3 by Lennart Ochel, 5 years ago

Status: newaccepted

See also #5920

comment:4 by arunkumar palanisamy, 5 years ago

This is now fixed with this PR https://github.com/OpenModelica/OpenModelica/pull/896, Now UnitDefinition are exported in modelDescription.xml

comment:5 by Francesco Casella, 5 years ago

Resolution: fixed
Status: acceptedclosed

Since this is a blocker ticket and we are close to the release date, I tentatively close it now. @Chad, feel free to reopen it if you still have problems with that.

Note: See TracTickets for help on using tickets.