Why subsystem reference loads all included subsystems in memory after openning top model?
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
Luca Ferro
on 11 Jan 2023
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 Comments
Luca Ferro
on 12 Jan 2023
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.
More Answers (0)
See Also
Categories
Find more on Subsystems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!