Opened 4 years ago

Closed 4 years ago

#5845 closed defect (fixed)

FMU export not creating UnitDefinitions section in ModelDescription.xml

Reported by: Chad Owned by: lochel
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 Changed 4 years ago by casella

  • Milestone changed from Future to 1.16.0
  • Priority changed from high to blocker

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

@lochel, can you please comment on that?

comment:2 Changed 4 years ago by casella

  • Summary changed from FMU export not creating UnitDefinitions section in ModelDescirption.xml to FMU export not creating UnitDefinitions section in ModelDescription.xml

comment:3 Changed 4 years ago by lochel

  • Status changed from new to accepted

See also #5920

comment:4 Changed 4 years ago by arun3688

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

comment:5 Changed 4 years ago by casella

  • Resolution set to fixed
  • Status changed from accepted to closed

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.