Linearize should be available from the OMEdit GUI
https://trac.openmodelica.org/OpenModelica/ticket/5626
@adeas31, it's really time we implement this for good, every year I teach a course at TU Delft where I need it, and I need to go through the CLI thing, which is ugly. We need also some kind of choice between Modelica, Matlab, or Python output, which is set by the --linearizationDumpLanguage flag.
Thanks!
Looks like the linearize API have same interface as simulate. So it makes sense to kind of integrate it in the existing simulation GUI interface.
I will investigate more how linearize is working and how we can integrate in a better way. Do you have any thing in mind how the GUI interface should be?
Basically, linearize() does a regular simulation and then computes the A,B,C,D matrices of the linearize system at the end of the simulation, using the final state values to compute the jacobians"
Interface setup:
- Add an extra button after Simulate with Animation, call it Linearize, add a 2x2 matrix on the icon
- Also add a Linearize checkbox at the bottom of the General Tab of the Simulation window
- Add a drop-down menu right above C/C++ Compiler Flags (Optional), with the options of
--linearizationDumpLanguageflag. We can skip "none" which is not very useful. Default Modelica. - The output is some generated file. The output text of the linearize function should be displayed in the Message window, it contains the exact location of the file
Test model: Modelica.Blocks.Continuous.Integrator
@adeas31 can this make it for 1.26.0?