Comment out block vs grounding signal

1 次查看(过去 30 天)
Is there a computational difference / simulation performance difference between commenting a block out vs grounding the signal of that block? I am working with a huge model with hundreds of bus signals which are used by referenced subsystems based on which version of the referenced subsystem is being called for that particular simulation. Will there be any performance benefits of commenting out signals as right now I ground the bus signals I do not use. If the difference is marginal how big does the model need to be to start finding measurable performance difference of using one method over the other? Thanks

回答(1 个)

Sebastian Castro
Sebastian Castro 2018-1-26
As far as I know, I don't think there is a difference.
In both cases, any block optimizations at code generation will remove unnecessary calculations that lead to grounds/commented-out blocks.
The best way to find out, though, is to try it yourself and look at the generated code :)
- Sebastian

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by