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.
0 个评论
采纳的回答
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
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 Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!