Compilation of variant subsystem
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi.
I have two big systems that works nice as separate models. My question is following will it change performance at any point of runnig the model if I put them into variant subsystem? Fast running is crucial for my project. Will it affect the length of compilation? Now I am on half an hour so longer compilation is also problem.
Thank you for answer:
0 commentaires
Réponse acceptée
Jonas
le 24 Août 2021
In a Variant Subsystem, only the active subsystem will be compiled. Any other variants inside the Variant Subsystem will be ignored. So the compilation time of a regular subsystem compared to the same subsystem as an active subsystem in a Variant Subsystem will be the same.
2 commentaires
Dinesh
le 2 Juil 2024
@Lukas Polacek, as of release R2024a, there are a couple of changes to Variant Subsystem. Compilation of inactive choices/subsystems depends on the "Variant Activation Time" chosen. By default when you create a Variant Subsystem, "update diagram" is the value of "Variant Activation Time" which means only the active subsytem will be compiled. However, you can change this value in the block parameters dialog of the block. To access this, right-click on the Variant Subsystem block and choose "Block Parameters". In the dialog, if the "Variant Control Mode" is chosen to be "expression", then you can modify the "Variant Activation Time" as well. The value "update diagram analyze all choices" means all the choices will be analyzed, which means that the inactive choices/subsystems will also be compiled (Since you don't want to encounter performance issues, you may not choose this value). There are other values such as "code compile" or "startup" which also anaylze all choices, but the difference is in how they generate code for the model. You can learn more about this in the following documentation: https://www.mathworks.com/help/simulink/slref/variantsubsystemvariantmodelvariantassemblysubsystem.html#:~:text=sim%20codegen%20switching-,Variant%20activation%20time,-%E2%80%94%20Time%20when
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Component-Based Modeling dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!