How to increase performance of variant subsystems?
Mostra commenti meno recenti
Hello, I got a model based on variant subsystems. I got one extremely big variant subsystem, so the model crashes during compiling. When I insert needed subsystems by hand and delete the rest it works fine. So my question is, is there a methed how to increase the performance of variant subsystems, or an alternative ?
6 Commenti
Lucas Maiß
il 29 Nov 2017
Birdman
il 29 Nov 2017
Actually, the purpose of variant subsystems is to comment out the rest of the subsystems while using only one of them. I did not understand how this can be.
Lucas Maiß
il 29 Nov 2017
Birdman
il 29 Nov 2017
Read the Code Generation part at the end of the page.
Tianhe
il 13 Mag 2025
Hello Lucas,
I also encountered the same problem. MATLAB sometimes crashes when generating code (Ctrl+B) and sometimes crashes even when I only copy a subsystem in the variant subsystem module. I also think that my variant subsystem is a bit complex. Do you have any further progress about this issue? New version may not helps. My MATLAB is 2024b.
Risposte (1)
Dinesh
il 3 Lug 2024
0 voti
Hi Lucas.
Over the years, there have been many improvements and new features added in "Variant Subsystem". I don't think you would face any performance issue if you use the latest MATLAB release. As of version R2024a (latest release), by default, when you add "Variant Subsystem" to the Simulink canvas, the setting is in such a way that only the active choice is compiled. Inactive choices including commented subsystems are ignored and will not be compiled.
However, you can change this behavior by modifying the "Variant Activation Time" field to a value other than "update diagram" which would compile all the choices. Only this change might affect the performance, otherwise you shouldn't see any.
Here's the latest documentation link for "Variant Subsystem": https://www.mathworks.com/help/simulink/slref/variantsubsystemvariantmodelvariantassemblysubsystem.html
Categorie
Scopri di più su Component-Based Modeling in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!