Clear Filters
Clear Filters

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

5 views (last 30 days)
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.

Accepted Answer

Luca Ferro
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
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.

Sign in to comment.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!