matth
matth

Reputation: 2696

Multiple MSL versions in Dymola

Dymola 2019FD01 comes with MSL 3.2.2 by default,
and Dymola 2020 comes with MSL 3.2.3 by default.

If I open a library with annotation(uses(Modelica(version="3.2.3"))); in Dymola 2019FD01 the following popup is displayed, suggesting to use the found old version: use found version

On the other hand, if I open a library with annotation(uses(Modelica(version="3.2.2"))); in Dymola 2020 the following popup is displayed, suggesting to convert: convert to newer version

This question is closely related to Update Modelica standard Library in Dymola in Linux which did not receive an answer, and also related to Modelica libraries use different MSL version which did receive an answer with a workaround that might not be sufficient for all cases.

Upvotes: 3

Views: 671

Answers (2)

Hans Olsson
Hans Olsson

Reputation: 12507

In Dymola 2020 (and later) there is another way, which even ensures that the MSL-version specific C-sources are used.

  • Set the global flag Advanced.PlaceDymolaSourceFirst=2
  • Ensure that you have compiled the C-sources in MSL with the correct compiler.
  • Possibly set the version as default in Edit > Options Versions tab.
  • Do NOT install ModelicaServices from GitHub.

This is documented in the Dymola User's Manual Volume 1; section 6.1.5 Additional Setup>Working with a Modelica version that is newer than the one in the distribution, page 909-910 in the Dymola 2020 version. (I just didn't find it earlier.)

Upvotes: 2

tbeu
tbeu

Reputation: 1349

In my opinion, the correct way to solve this would be to make MSL 3.2.3 available in Dymola 2019FD01. Any comments on this assumption?

Older tools might not support newer library features, see https://github.com/modelica/ModelicaStandardLibrary/issues/2091#issuecomment-272687901 for one recent example I remember. Or take the Modelica synchronous language features for another example.

Could I also use the MSL as tagged & released on github or are there any changes?

  • The ModelicaServices from the GitHub released MSL are just placeholders and need to be replaced by the tool-specific ModelicaServices one.
  • The C-Sources of the ModelicaStandardTables etc. from the GitHub released MSL are probably not used, but the tool-distributed will be used.

Is there a better (official, documented) way how to handle this?

Not yet. See https://github.com/modelica/ModelicaSpecification/issues/1023 or https://github.com/modelica/ModelicaSpecification/issues/556 for the corresponding Modelica specification issues.

Upvotes: 4

Related Questions