- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OpenModelica API?
OpenModelica API?
Re: OpenModelica API?
For scripting with omc: https://build.openmodelica.org/Document … pting.html
There is no other API as of yet (assuming you consider the CORBA interface the same as mos-scripting)
- sjoelund.se
- 1700 Posts
Re: OpenModelica API?
Is FMI relevant here? OpenModelica exports FMU's, and I'm also wondering if an FMU can be used to simulate a model outside of the context of any tools by using the .dll's or source code?
I'm looking at the FMI documentation, but any heads-up would be appreciated in terms of whether or not FMI can do what I hope it does.
Thanks again!
Re: OpenModelica API?
Yes. Scripting is like a mos-script. You can also use popen and read/write using stdin and stdout though. Or named pipes, etc.
FMI is different from the OMC API. You can use it to control a simulation, but that's about it.
- sjoelund.se
- 1700 Posts
Re: OpenModelica API?
Can you use the contents of an FMU to modify a simulation configuration (start time, stop time, increment, initial values of variables, parameters, etc.), run that simulation, and then get the output (i.e. a csv)? And all of this outside of the context of ANY tool? (FMU's include the solvers used for a simulation, right? Even if they're hidden in .dll's?)
Thanks for your help sjoelund!
Re: OpenModelica API?
You can do this without using FMU and without recompling the executable (parameter sweeps).
Simply use the buildModel command to create the executable, and then modify the command-line switches sent to the executable or modify the xml-file.
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OpenModelica API?