Reputation: 11
There is an open source Modelica Library package that I want to use in Open Modelica/OMEdit The package was originally developed in Dymola, and is available here: https://greenhouses-library.readthedocs.io/en/latest/
When I open the library in OMEdit and check the "Greenhouse" Example model it provides this error message, which I believe is telling me that the dymola library is not available.
[1] 15:04:18 Scripting Notification You can install the requested package using one of the commands: installPackage(DymolaCommands, "master", exactMatch=true) installPackage(DymolaCommands, "1.1", exactMatch=false) installPackage(DymolaCommands, "1.1", exactMatch=false).
`
Does anyone have info on how to convert a library that was originally developed in dymola to be suitable for Open Modelica. The OpenModelica documentation talks about porting, but I'm not sure how to systematically remove and replace any of the references to DymolaCommands.
Please note - engineer, attempting to use this code to shortcut a piece of work. Steep learning curve....
Tried deleting the text DymolaCommands(version="1.1"), just get a lot more error strings when checking the models,
Tried searching for dymola commands library online - no package available
Attempted to "Load External model" in OM edit but no luck.
Upvotes: 1
Views: 356
Reputation: 4231
Ok. I had to fork the library to change some things in it:
With my changes the models compile but simulation has issues at initialization, I will check those later.
I then repointed the Greenhouse library in OpenModelica to my fork: https://github.com/adrpo/Greenhouses-Library so if you update it from OpenModelica you will get the new version with my changes.
We will also get automatic testing for it from now on here: https://libraries.openmodelica.org/branches/master/Greenhouses/Greenhouses.html
I will make a PR with my changes to the original library and if they accept my PR we can switch the OpenModelica library index one back to it.
Upvotes: 4
Reputation: 786
DymolaCommand is a library distributed with Dymola that contains a lot of functions pointing to external c-functions to ease the use of models etc. It seems that the library you are using is using functions from this package. Have you tried to use the models with a Dymola demo version? you could also ask for a test license. The only other solution would be to find out which functions are used from the DymolaCommands and to replace the functions with your own code.
Upvotes: 0