Effacer les filtres
Effacer les filtres

Compilation of variant subsystem

6 vues (au cours des 30 derniers jours)
Lukas Polacek
Lukas Polacek le 24 Août 2021
Commenté : Dinesh le 2 Juil 2024 à 6:03
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:

Réponse acceptée

Jonas
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
Lukas Polacek
Lukas Polacek le 24 Août 2021
Thank you that is what I need.
Dinesh
Dinesh le 2 Juil 2024 à 6:03
@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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Subsystems dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by