Closed Primkins closed 3 months ago
@Primkins i guess the latest version of OMSimulator
should be OMSimulator v2.1.1.post248
, please download the latest nightly builds and test it , it should work
Pip fails on installing the OMSimulator-V2.1.1.post248 with this URL https://[build.openmodelica.org/omsimulator/nightly/win-msvc64/OMSimulator-win64-v2.1.1.post248-gf7c50c9.zip]. Please share the URL of OMSimulator-V2.1.1.post248.
It installs OMSimulator-V2.1.1.post190 only.
@Primkins ok i see that you are using pip package, the pip package is not updated yet, I will make a new release in pip today
Is this updated?
no not yet, unfortunately I am little bit busy with some works, I will try to fix this week
OK. Thank you.
@Primkins but if you are using OpenModelica you can use the latest OMSimulator from there
I require OMSimulator for running the FMU from python.
https://[openmodelica.org](https://openmodelica.org/)/ site is down.
@Primkins yes it is down, i guess some server issue, it will be fixed soon
@Primkins the site is back online https://openmodelica.org/
Thank you
Has this been updated?
@Primkins No I am little busy with other works, I will be free in the middle of this week and see if i can fix it, it seems the zip files are not uploaded to server and that is the issue, i need to look into it
OK. Thank you
The problem is this: https://github.com/OpenModelica/OpenModelica/issues/11604 and this: https://github.com/OpenModelica/OpenModelica/issues/12065. Try to build the FMU with v1.22.3 or the nightly-build.
Ah, it might also be that Windows 11 has changed the way it searches for dlls. I think @AnHeuermann has looked into it and fixed it in the fmi4c library but we will need to port that change to OMSimulator.
OK. Thank you. I will check.
@Primkins In the meanwhile the you should get the latest OMSimulator python artifacts from here https://test.openmodelica.org/jenkins/job/OMSimulator/job/master/764/, Currently the artifacts are not uploaded to the server, So please use the attached zip file for the latest OMSimulator python pip package, you must unzip this in the following location lib/site-packages/
to know where the site-package path type the following in a terminal python -m site
(base) c:\juliatest\OMSimulator\OMSimulator>python -m site
sys.path = [
'c:\\juliatest\\OMSimulator\\OMSimulator',
'C:\\ProgramData\\Anaconda3\\python38.zip',
'C:\\ProgramData\\Anaconda3\\DLLs',
'C:\\ProgramData\\Anaconda3\\lib',
'C:\\ProgramData\\Anaconda3',
'C:\\Users\\arupa54\\AppData\\Roaming\\Python\\Python38\\site-packages',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\certifi-2020.12.5-py3.8.egg',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\ompython-3.5.0-py3.8.egg',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib',
'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin',
]
for me it is C:\\ProgramData\\Anaconda3\\lib\\site-packages
and you can unzip it here and it should work i hope
Ah, it might also be that Windows 11 has changed the way it searches for dlls. I think @AnHeuermann has looked into it and fixed it in the fmi4c library but we will need to port that change to OMSimulator.
Yes i will update the submodule
Installed the OpenModelica-V1.23 nightly build version (OpenModelica-v1.23.0-dev-376-g4df9b45477-64bit.exe) and created the BouncingBall.fmu Copied the OMSimulator folder under python installed location (C:\Python38\Lib\site-packages).
Upon running the bouncing ball fmu from python, below error is displayed
status: [correct] ok status: [correct] ok error: [validateFMU] could not load the ssd schema file: C:/Python38/share/OMSimulator/schema/fmi2/fmi2ModelDescription.xsd error: [terminate] Model "test" is in wrong model state status: [correct] ok Loading DLL failed: D:\TestFMU\test_tmp\test-qc3mkx2u\temp\0001_A\binaries\win64\BouncingBall.dll Failed to load functions for FMI 2.info: fmi2Instantiate() failed Function "fmi2FreeInstance" is not provided by this FMU. info: 0 warnings info: 2 errors
@Primkins Submodule OMSimulator
is not pushed to OpenModelica master yet, This PR https://github.com/OpenModelica/OMSimulator/pull/1284 got stuck for some unknown reason, Hopefullly this will be fixed by today
@Primkins the pip package is fixed now and the latest OMSimulator
version is published to pip https://pypi.org/project/OMSimulator/2.1.1.post257/, please update your omsimulator
pip package pip install OMSimulator -U
and test it and also download the latest openmodelica nightly builds from tomorrow and export the fmu's and hopefully everything should work, I did some testing and it works from my side
The issue has been resolved. Thanks
Description
OMSimulator(V2.1.1) with python interface is having issues in reading the FMU created in Openmodelica(V1.23.0) on windows 11 system.
Steps to reproduce the behavior
Create a Step block FMU in Openmodelica (V1.23.0), and try to run in OMSimulator (V2.1.1) with python interface. it fails. Create a Step block FMU in Openmodelica (V1.14.0), and try to run in OMSimulator (V2.1.1) with python interface. it runs.
Screenshots
Version and OS
OMSimulator --2.1.1
]Openmodelica --1.23.0
]Win11, 64bit
]