Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

OpenModelica FMU-Export displayUnit

OpenModelica FMU-Export displayUnit

Hello,

I'um using the API-Call "convertMo2Fmu()" to export a modelica model into an fmu. After that I want to reload the model via fmpy (to python). Unfortunately via the API-call "convertMo2Fmu()" the information "displayUnit" is lost. So if I open the *.xml-file of the model, there are only the following informations:

  <!-- Index of variable = "9" -->
  <ScalarVariable
    name="P"
    valueReference="15"
    description="electrical power"
    causality="output"
    >
    <Real nominal="1000.0" unit="W"/>
  </ScalarVariable>
  <!-- Index of variable = "10" -->

In this example displayUnit should be "kW". And a second question:

Is it possible to export the annotation into the xml-file? For example:
parameter Real pi_charge_max(quantity = "1/Time", unit = "1/s", displayUnit = "1/h") = pi "Power to capacity ratio" annotation(Dialog(tab = "design"));

--> tab = "design"

Edited by: IfES-Luke - Mar-03-22 11:28:59
There are 0 guests and 0 other users also viewing this topic
You are here: