Compilation of variant subsystem

3 次查看(过去 30 天)
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:

采纳的回答

Jonas
Jonas 2021-8-24
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 个评论
Dinesh
Dinesh 2024-7-2
@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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by