Quickly following my previous post, I also intend to show some actual results here, as everything up till now was mostly theory and implementation details.
Taking the example of previously described“chaos” block, we can see the output during Modelica blocks compilation and simulation using the new OpenModelica support.
(Corresponding Modelica code)
Building the Block
Some text output commands were added to the different Scilab scripts (.sci) involved in Modelica blocks generation, so that we can get some information after running the “chaos” model demonstration:
(Scilab console output during Modelica code generation, flattening, FMU packaging and C library linkage)
(Modelica block properties taken from XML description file)
After that, we can also see the output inside current temporary files folder:
containing the main Modelica block code (Chaos_Modelica_im.mo):
and its flattened form (Chaos_Modelica_imf.mo), combined with the other source files:
as well as the partially generated C code file (Chaos_Modelica_im.c) glue between FMI2 library (binaries/platform/Chaos_Modelica_im.so) and Scicos block API:
Also, we get the unzipped/extracted FMU package (Chaos_Modelica_im.fmu) folder:
and the resulting C library for the block (libChaos_Modelica_im.so), linked to the whole Xcos model for simulation.
Running The Code
Executing Scilab from command line, we can also see the output from the FMI2 instance log calls:
(The flag lines were added manually to the computational function code)
Final Thoughts
The tests also revealed bug in the implementation which were partially fixed (and also updated here in the blog posts). Some issues still need to be addressed, but for now things seems to be progressing well.
That’s it for now. Thanks one more time for sticking by. See you soon !