Can Accelerator work on model with algebraic loop?
7 次查看(过去 30 天)
显示 更早的评论
I am using a legacy Simulink mdl file that I am pretty sure contains an algebraic loop. The model is slow to execute so I turned on the Accelerator. Each time I run the simulation, it reports 'Successfully built the Accelerator target for model', so the Accelerator can run even if a model contains an algebraic loop, right? But, if it is rebuilding each time the model runs, am I better off with Normal execution?
0 个评论
采纳的回答
Kaustubha Govind
2012-2-27
This is strange - if you are not making any changes to your model between runs, then the Accelerator target should not rebuild. Perhaps you should report this as a bug to MathWorks Tech Support.
Regarding your question about whether you might be better off with Normal Mode simulation - it depends. Yes, there is an initial overhead for generating and building code in Accelerator mode, but if your simulation is very long and expensive, then that initial overhead may be relatively cheap. The best way to figure out is to time your simulation. Using the tic-toc commands:
>> tic; sim(bdroot); toc
in both simulation modes and see which works out faster.
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!