Closed martinscripts closed 6 months ago
@martinscripts the issue is fixed with this commit 891528c8009348881019c81d8d7420c1a8d3ee14, now i can get the correct results
>>> from OMPython import ModelicaSystem
>>> mod1 = ModelicaSystem("C:/OPENMODELICAGIT/OpenModelica/OMCompiler/Examples/BouncingBall.mo", "BouncingBall")
>>> mod2 = ModelicaSystem("C:/OPENMODELICAGIT/OpenModelica/OMCompiler/Examples/VanDerPol.mo", "VanDerPol")
>>> mod1.linearize()
[[[0, 1], [0, 0]], [], [], []]
>>> mod2.linearize()
[[[0, 1], [-0.730936067860485, -0.248180066111424]], [], [], []]
>>>
please update your pip package by python -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip
Thanks @arun3688.
I had to
pip uninstall OMPython
and then
pip install git+https://github.com/OpenModelica/OMPython.git/@master
and now it works.
Description
If two models are loaded and linearized, only the first call of linearize() returns the correct result. All following calls will return the first call's result.
Steps to Reproduce
Expected Behavior
The result of the second linearization (mod2.linearize) should be
[[[0, 1], [-0.730936067860485, -0.248180066111424]], [], [], []]
but it only returns that after a kernel restart and when mod2 is executed first.Version and OS