Why subsystem reference loads all included subsystems in memory after openning top model?

1 次查看(过去 30 天)
Hello everyone.
During our project we made deep hierarchy model by using subsystem references. And when we are trying to load top model its calling each subsystem from low level in memory. I am not sure if it is appropriate behaviour for this block otherwise I do not see any difference from common subsystem variant. Maybe there is some option to fix this behaviour? Thanks for any help.

采纳的回答

Luca Ferro
Luca Ferro 2023-1-11
A subsystem can be virtual or non-virtual.
A virtual subsystem is just a graphical thing, so it actually is on the same level as the top system in which it is defined from a compiling point of view. It is just used to make the model visually tidy.
A non-virtual is both graphical and 'factual' (a unit on its own), it is considered one level deeper than the top system in which is defined. This is probably what you want.
  3 个评论
Luca Ferro
Luca Ferro 2023-1-12
i didn't understand you meant matlab memory, i was thinking about compile time/runtime memory allocation. Sorry.
I think there is no way to avoid it in simulink, it will always load them all.
You can try to create a system composer architecture as a top model and populate it with reference components for every subsystem, but it's just a workaround and involves using another tool.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by