0

I exported a FMU 2.0 model in Dymola 2015 recently, and I had some issue with the initialization.

Before exporting the model, I checked the validity of the model by connecting the input connectors to some constant values that know the exact output value, it turned out that everything looks good. The model could be translated, initialized and simulated as expected.

Then I went on to export my model as ME FMU 2.0 RC. In C, it could be instantiated, and fmiSetupExperiment is called successfully before entering the initialization, however, it failed initialization right after calling fmiEnterInitializationMode.

The Error looks like the image below enter image description here

I tried to assign some reasonable input values to the model according to this post Initialization of a Dymola FMU in Simulink but it did not help.

Then I found that I had several scalarVariables that has initial="approx", but when I checked their final values in Dymola, the initial approximation is decently close to the final value.

So I am quite confused on what to try next...I wonder if anyone here could help me a bit (I don't even know what does this error message mean...) I'd be greatly appreciated.

Thanks!

Community
  • 1
  • 1
Hang Yu
  • 476
  • 2
  • 14
  • 1
    Can I assume that you have a need to use model exchange vs. co-simulation? I ask because I would assume (I don't actually know for sure) that with co-simulation the solver for initial conditions will be bundled with the FMU. So that might result in the same solution you saw in Dymola. – Michael Tiller Sep 17 '14 at 13:04
  • I need the event update function in ME, so I kinda have to use ME instead of CS. In FMI 2.0 Beta4, I could mix use them, but 2.0RC has a clear separation when instantiating the model. Do you mind if I ask what's the difference between CS Init solver and ME init solver? – Hang Yu Sep 17 '14 at 14:01
  • Just an update, I used getReal() to get some values after entering the initialization mode and compared them with the result in Dymola at time 0, it seems that the results turned out to be exactly the same, so I wonder if it is possible that the model has been initialized already, but the error message stopped the everything going forward. I may probably try to modify some source code to cheat a bit to see if it helps. – Hang Yu Sep 17 '14 at 14:36

0 Answers0