RWTH-EBC / AixLib

A Modelica model library for building performance simulations

Home Page:https://ebc-tools.eonerc.rwth-aachen.de/aixlib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compability with MSL 4.0 (Dymola >= 2021x)

DaJansenGit opened this issue · comments

Problem

Starting with the Dymola 2021x version, the MSL 4.0 is included and automatically loaded. As the IBPSA library still uses MSL 3.2.3 and AixLib is build upon IBPSA library this leads to version conflicts due to changes like Modelica.SIunits → Modelica.Units.SI.
The problem and possible workarounds are described and discussed in the corresponding IBPSA issue: ibpsa/modelica-ibpsa#1423

Possible Workarounds

As long as IBPSA library stays with MSL 3.2.3 we have the following workarounds. Both need you to download MSL 3.2.3 from GitHub first.

  • If you have write access to your Dymola installation folder just copy the Modelica folder to your installation folder...\Dymola 2021x\Modelica\Library. Now you should be able to select MSL 3.2.3 inside Dymola under Tools/Options/Version
  • If you have no write access you can use a .mos script instead. This could be something like this. Paths need to be changed:
// Adapt path if necessary
openModel("C:/Program Files/Dymola 2021x/Modelica/Library/ModelicaServices 4.0.0/package.mo", changeDirectory=false)
// MSL v4.0.0 must be unloaded before loading old MSL
eraseClasses({"Modelica"})
eraseClasses({"ModelicaServices"})
// Download the Modelica Standard Library (MSL) as a tag from here:
// https://github.com/modelica/ModelicaStandardLibrary/releases/tag/v3.2.3%2Bbuild.4
openModel("D:/04_Git/MSL323/Modelica 3.2.3/package.mo", changeDirectory=false)

The code mentioned above worked for me, thanks! However I need to execute it at every start up of Dymola as I have no write acess. Hence I can recommend pasting the code in the load_libraries.mos at the very beginning of the script, thawt worked for me.

As current releases are using current dymola versions with 4.0, we don't need this information anymore.