#6261 closed discussion (fixed)
How can I load the last Modelica & Complex versions?
Reported by: | Owned by: | Francesco Casella | |
---|---|---|---|
Priority: | high | Milestone: | NeedsInput |
Component: | *unknown* | Version: | 1.16.0 |
Keywords: | Cc: |
Description
From Dymola 2021x, the last versions of Modelica & Complex are:
Modelica(version="4.0.0"), Complex(version="4.0.0")
How can I load these last Modelica & Complex versions?
Kind regards
Change History (24)
follow-up: 2 comment:1 by , 4 years ago
comment:2 by , 4 years ago
Replying to sjoelund.se:
updatePackageIndex(); installPackage(Modelica, "4.0.0+maint.om");And change your OMEdit to load it instead of 3.2.3. Be prepared for packages breaking since there is no automatic conversion of older libraries to Modelica 4.0.0.
Please can you be more explicit for me as I don't know how and where to run these commands?
follow-up: 8 comment:3 by , 4 years ago
Make a script.mos file containing these commands. Then run in a terminal via:
omc script.mos
Then restart OMEdit.
I think is also possible to run these via OMEdit CLI but I'm not sure how.
I will find out and will get back here with the answer.
comment:4 by , 4 years ago
Ah, in OMEdit->Tools->OpenModelica Compiler CLI at the bottom you can write commands and then click send.
comment:5 by , 4 years ago
@jean-philippe, as developer of PowerSysPro you have to make a strategic decision when to transition it to use MSL 4.0.0. This has many benefits, since the new MSL is much better structured, but it is an irreversible move. Once you do it, you need to convert all of your existing models using PowerSysPro to continue using them, and there is no way to convert them back to 3.2.3.
Eventually we will have to integrate the management of library upgrades into OMEdit, but it is too late to do that for 1.17.0, so we plan to do it for 1.18.0, due in July 2021.
Currently, you will have to perform the upgrade of PowerSysPro and of all the models you developed with it, by means of Dymola, and then select MSL 4.0.0 as the default Modelica library in OMEdit. This could be a bit inconvenient if you are also using OMEdit for other projects that still use MSL 3.2.3, proper handling of these situations will come with version 1.18.0.
follow-up: 7 comment:6 by , 4 years ago
@jean-philippe, one more thing. I understand version 1.5 of your library now use MSL 4.0.0. As such, it is not backwards compatible with 1.4, meaning that any model that was built with 1.4 needs conversion scripts to be able to run in 1.5, because it will be using a non-backwards-compatible version of MSL.
I would suggest you to start using semantic versioning for the version numbers of you library, see http://www.semver.org, which is becoming the de-facto standard in the Modelica community. If you do, 1.5 should be renamed 2.0.0 (i.e., major revision).
comment:7 by , 4 years ago
Replying to casella:
@jean-philippe, one more thing. I understand version 1.5 of your library now use MSL 4.0.0. As such, it is not backwards compatible with 1.4, meaning that any model that was built with 1.4 needs conversion scripts to be able to run in 1.5, because it will be using a non-backwards-compatible version of MSL.
I would suggest you to start using semantic versioning for the version numbers of you library, see http://www.semver.org, which is becoming the de-facto standard in the Modelica community. If you do, 1.5 should be renamed 2.0.0 (i.e., major revision).
I will change the versionning and rename the recent version as 2.0.0.
comment:8 by , 4 years ago
Replying to adrpo:
Make a script.mos file containing these commands. Then run in a terminal via:
omc script.mos
Then restart OMEdit.
I think is also possible to run these via OMEdit CLI but I'm not sure how.
I will find out and will get back here with the answer.
When I do that the result from omc is false.
comment:9 by , 4 years ago
Ok, let's try to change the script.mos a bit to get more info:
updatePackageIndex(); getErrorString(); installPackage(Modelica, "4.0.0+maint.om"); getErrorString();
follow-up: 11 comment:10 by , 4 years ago
I tried myself in Windows and it doesn't work because the Windows installer sets OPENMODELICALIBRARY environment variable and that one somehow interferes with the library package manager. In Linux this works fine as this variable is not set.
To fix this in Windows just remove (or maybe better to rename it) the OPENMODELICALIBRARY environment variable, then run the script and it should install the 4.0.0 Modelica library in your %APPDATA%/.openmodelica folder.
comment:11 by , 4 years ago
Replying to adrpo:
I tried myself in Windows and it doesn't work because the Windows installer sets OPENMODELICALIBRARY environment variable and that one somehow interferes with the library package manager. In Linux this works fine as this variable is not set.
To fix this in Windows just remove (or maybe better to rename it) the OPENMODELICALIBRARY environment variable, then run the script and it should install the 4.0.0 Modelica library in your %APPDATA%/.openmodelica folder.
I guess we should try to get the command-line package manager to work in Windows also. From what you wrote, I have the impression that it only works in Linux. Do I miss something?
follow-up: 13 comment:12 by , 4 years ago
Works fine în Windows as well, I tested it but you need to remove the OPENMODELICALIBRARY environment variable. We also need to change the installer to not set it.
comment:13 by , 4 years ago
Replying to adrpo:
Works fine în Windows as well, I tested it but you need to remove the OPENMODELICALIBRARY environment variable. We also need to change the installer to not set it.
No OPENMODELICALIBRARY environment variable is defined on my computer.
But I'm very sorry as it still doesn't work.
I cannot attach a screenshot of the error detected as I get a captcha error (rejected as potential spam).
NB: if you can answer me the MSL 4.0.0 will automatically be available with next 1.17.0 it could be enough for me.
comment:14 by , 4 years ago
My error is:
"Error: Curl error for URL https://libraries.openmodelica.org/index/v1/index.json: Couldn't connect to server
Error: Failed to download package index https://libraries.openmodelica.org/index/v1/index.json to file C:/Users/a37619/AppData/Roaming/.openmodelica/libraries/index.json."
Maybe due to my stupid EDF vpn...
follow-up: 16 comment:15 by , 4 years ago
Ouch, I don't think we have a way yet to set any proxy setting.
follow-up: 19 comment:16 by , 4 years ago
Replying to adrpo:
Ouch, I don't think we have a way yet to set any proxy setting.
Don't worry but can you confirm me that Modelica(version="4.0.0") and Complex(version="4.0.0") will automatically be available with the next 1.17.0?
comment:17 by , 4 years ago
I don't know. I'll bring this up in the OSMC developers meeting tomorrow and we'll decide which Modelica version should be shipped / default in 1.17.0.
follow-up: 21 comment:18 by , 4 years ago
In case of difficulties with installPackage you could just download Modelica 4.0 from modelica.org, and use it.
follow-up: 22 comment:19 by , 4 years ago
Replying to jean-philippe.tavella@…:
Replying to adrpo:
Ouch, I don't think we have a way yet to set any proxy setting.
Don't worry but can you confirm me that Modelica(version="4.0.0") and Complex(version="4.0.0") will automatically be available with the next 1.17.0?
That's a good question, if that is a requirement for you, we can discuss that. For sure we still won't have proper version management in OMEdit, so we need to make sure everything works properly.
follow-up: 23 comment:21 by , 4 years ago
Replying to anonymous:
In case of difficulties with installPackage you could just download Modelica 4.0 from modelica.org, and use it.
I successfully tested this proposal. Thank you.
comment:22 by , 4 years ago
Replying to casella:
Replying to jean-philippe.tavella@…:
Replying to adrpo:
Ouch, I don't think we have a way yet to set any proxy setting.
Don't worry but can you confirm me that Modelica(version="4.0.0") and Complex(version="4.0.0") will automatically be available with the next 1.17.0?
That's a good question, if that is a requirement for you, we can discuss that. For sure we still won't have proper version management in OMEdit, so we need to make sure everything works properly.
Not a requirement, just a wish.
comment:23 by , 4 years ago
Replying to jean-philippe.tavella@…:
Replying to anonymous:
In case of difficulties with installPackage you could just download Modelica 4.0 from modelica.org, and use it.
This is not always going to work. For example, the Modelica
package depends on ModelicaServices
, and that needs to be tool-specific. Most models will probably work, but I won't recommend this as a fail-safe solution.
comment:24 by , 4 years ago
This is not always going to work. For example, the Modelica package depends on ModelicaServices, and that needs to be tool-specific. Most models will probably work, but I won't recommend this as a fail-safe solution.
I would recommend grabbing
https://github.com/OpenModelica/OpenModelica-ModelicaStandardLibrary/tree/OM/maint/4.0.x
or
https://github.com/OpenModelica/OpenModelica-ModelicaStandardLibrary/tree/OM/master
Those are the patched versions, as used by the package manager (of course that filters out some things though)
And change your OMEdit to load it instead of 3.2.3. Be prepared for packages breaking since there is no automatic conversion of older libraries to Modelica 4.0.0.