如何解决分体式 Dymola
我在使用“拆分模型”选项时遇到问题。我想要做的基本上就是隐藏这 10 个水卷:。
最终结果正是我想要的:
当我检查整个模型以验证一切是否正常时,出现了以下错误:
我已经尝试了一些事情,例如修改拆分模型的文本部分,但没有任何积极的结果,这是原始未修改
编辑:我正在使用 TIL 库
根据 Markus 的回答进行编辑:在拆分模型中是否需要声明液体类型并更改 portArray 定义。我复制了这些代码行,一切正常!
parameter TILMedia.LiquidTypes.BaseLiquid liquidType = sim.liquidType1
"Liquid type" annotation (Dialog(tab="SIM",group="SIM"),choices(
choice=sim.liquidType1 "Liquid 1 as defined in SIM",choice=sim.liquidType2 "Liquid 2 as defined in SIM",choice=sim.liquidType3 "Liquid 3 as defined in SIM"));
replaceable package MediaConfiguration =
TIL.Utilities.MediaConfiguration
constrainedby TIL.Utilities.Internals.PartialMediaConfiguration
"Media and State Type Configuration" annotation (choicesAllMatching,Dialog(
tab="SIM",group="Media Configuration"));
protected
outer TIL.SysteminformationManager sim "System information manager";
和
public
TIL.Connectors.LiquidPort portArray(
final liquidType=liquidType) ;
TIL.Connectors.LiquidPort portArray1(
final liquidType=liquidType) ;
解决方法
这个问题似乎是由连接器的矢量化引起的,在使用“拆分模型”时似乎会丢失。没有实际模型有点困难,但是:
您是否尝试将 connect
中的最后两个 str3000
语句修改为:
connect(portArray,colume.portArray[1])
connect(portArray1,colume.portArray[2])
此外,在模型的顶层,您似乎与 str3000.portArray
的向量有联系。尝试删除它们,因为它们似乎是错误的,因为您有两个非矢量端口。
应该有类似 connect(str3000.portArray[1],...)
和 connect(str3000.portArray1[2],...)
之类的东西,它们可能应该更改为 connect(str3000.portArray,...)
和 connect(str3000.portArray1,...)
。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。