Are there no suggestions possible? Maybe I can clarify the question or give you more details if needed!
Why does my Simulink-Model rebuild at every iteration?
3 views (last 30 days)
Show older comments
I'am trying to speedup my simulink project and want to use the Accelerator-Simulation mode.
The aim of the project is to control a cyclic process and is structured as followes:
- matlab-script, where all parameters and a feedforward control with parameter estimation is implemented. Also it starts simulating the simulink model for each iteration.
- simulink model, where the dynamic system and the feedforward control (basically a lookup-table) together with a feedback control is implemented. Parameters of all blocks are set by workspace variables/structs generated by the script.
The feedforward control variable is calculated and parameter are estimated from the simulated data after every simulation pass. Then the model is simulated again. The model is not changing during the iterations, but still it is compiling at every cycle. From the first: Is this solution appropriate for using the Accelerator mode?
I tried to follow theses proposed steps to determine, why it is built at every iteration: http://de.mathworks.com/help/simulink/examples/determining-why-simulink-accelerator-is-regenerating-code.html?refresh=true
If i run it with the Accelerator-Mode (referring to the documentation of this function, it now compiles for simulation), I still cannot reproduce why it is compiled at every iteration.
csdet1.ContentsChecksum.Value ~= csdet2.ContentsChecksum.Value
is true, but the proposed code does not find any details.
csdet1.InterfaceChecksum.Value ~= csdet2.InterfaceChecksum.Value
is also true, the proposed code outputs that
UserDefinedTypesChecksum
is different. What does that mean and how can I resolve this?
Sidefact: When I run Simulink.BlockDiagram.getChecksum() with the Model opened in Simulink and Normal-Mode chosen, I get this error:
Continuous update specified for this chart chartname This is not supported for RTW."
But this chart is a Matlab-Function block, not a stateflow chart?!
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!