Compilation of variant subsystem

1 visualizzazione (ultimi 30 giorni)
Lukas Polacek
Lukas Polacek il 24 Ago 2021
Commentato: Dinesh il 2 Lug 2024
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:

Risposta accettata

Jonas
Jonas il 24 Ago 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 Commenti
Lukas Polacek
Lukas Polacek il 24 Ago 2021
Thank you that is what I need.
Dinesh
Dinesh il 2 Lug 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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Component-Based Modeling in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by