Modelica 库使用不同的 MSL 版本 [英] Modelica libraries use different MSL version

查看:29
本文介绍了Modelica 库使用不同的 MSL 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Dymola 中一起使用两个 Modelica 库,所以为了方便起见,我编写了一个小脚本,loadLibraries.mos 来打开这两个库.但是他们使用不同版本的 MSL(3.2.1 与 3.2.2),由顶级 package.mo 中的 uses 注释定义:

I want to use two Modelica libraries together, in Dymola, so for convenience I wrote a little script, loadLibraries.mos that just opens the two libraries. But they use different versions of the MSL (3.2.1 versus 3.2.2), defined by the uses annotation in the top level package.mo:

annotation(uses(Modelica(version="3.2.1")));

我们开发的库使用的是3.2.2,使用MSL 3.2.1的库是别人开发的.现在每当我运行 mos 脚本时(或者当我手动打开两个库时),Dymola 都想运行一个更新脚本.据我所知,更新脚本没有任何改变,所以我想

The library developed by us uses 3.2.2, the library that uses MSL 3.2.1 is developed by someone else. Now whenever I run the mos script (or when I open the two libraries manually), Dymola wants to run an update script. As far as I can see, nothing gets changed by the update script, so I would like to

  • 要么根本不运行它,例如通过定义一系列可接受的版本,例如 annotation(uses(Modelica(version>="3.2.1")));

或者总是运行它,而不先询问,例如通过设置一些标志AlwaysSilentyAcceptMSLUpgrade.
在编辑、选项、版本下有一个复选标记强制将模型升级到 MSL 版本,但我不确定如何从我的 mos 脚本中使用它(对于所有用户).

or always run it, without asking first, e.g. by setting some flag AlwaysSilentyAcceptMSLUpgrade.
Under Edit, Options, Version there is a checkmark Force upgrade of models to MSL version but I am unsure how to use it from my mos script (for all users).

推荐答案

不要更改您自己的库,而是将使用 Modelica 3.2.1 的库设为只读(例如通过将文件设为只读).

Don't change your own library, but make the library using Modelica 3.2.1 read-only (e.g. by making the files read-only).

>

那应该跳过提示(至少从 Dymola 2016 开始)-据我所知,您无论如何都不会自己编辑该库.

That should skip the prompt (at least from Dymola 2016) - and as far as I understand you don't edit that library yourself anyway.

这适用于不需要在版本之间进行任何更新的库;这显然适用于 Modelica 3.2.1->3.2.2,因为没有转换——但如果有一个不影响这个特定库的转换,它也可以工作.

That works for libraries that don't need any update between the versions; which obviously holds for Modelica 3.2.1->3.2.2 since there is no conversion - but it would also work if there were a conversion that didn't influence this particular library.

这篇关于Modelica 库使用不同的 MSL 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆