Closed arun3688 closed 6 months ago
https://github.com/OpenModelica/OMPython/issues/206
This PR fixes the result file path when resultfile location is provided by the user.
resultfile
>>> from OMPython import ModelicaSystem >>> mod = ModelicaSystem("C:/BouncingBall.mo", "BouncingBall") >>> mod.simulate(resultfile="C:/OPENMODELICAGIT/BouncingBall_res.mat") // path provided by user LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. >>> mod.resultfile 'C:/OPENMODELICAGIT/BouncingBall_res.mat' >>> mod.getSolutions() ('der(h)', 'der(v)', 'e', 'flying', 'foo', 'g', 'h', 'impact', 'time', 'v', 'v_new') >>> mod.simulate(resultfile="test.mat") // providing only the file name LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. >>> mod.getSolutions() ('der(h)', 'der(v)', 'e', 'flying', 'foo', 'g', 'h', 'impact', 'time', 'v', 'v_new')
Related Issues
https://github.com/OpenModelica/OMPython/issues/206
Purpose
This PR fixes the result file path when
resultfile
location is provided by the user.Usage