Effacer les filtres
Effacer les filtres

simulink coder rsim runtime

3 vues (au cours des 30 derniers jours)
Julian Becker
Julian Becker le 17 Juil 2018
Hello, I've got some problem deploying Simulink models to executables. The runtime difference between the RSIM executable and the Simulink calculation is huge. The executable takes up to 10 times longer. My expectation was that it would be the other way. So my question is if this is normal and if there is anything I can do about this? My sample models where 'rtwdemo_rsimtf' that i compiled just as described in https://de.mathworks.com/help/rtw/examples/using-rsim-target-for-batch-simulations.html. My other samples where a simple addition of constants and one complicated model. I ran the executable with system('modelname') and the model with sim('modelname') and stopped the time with tic and toc. I let them run once or up to a 1000 times in a row and the sim command was always a lot faster. I checked the documentation for better performance but nothing helped to speed it up. Is this normal?

Réponses (1)

Rishabh Rathore
Rishabh Rathore le 27 Juil 2018
It is expected for executable to take a longer time than simulation.
But you can try using linear solvers (fixed step solvers) to reduce the execution time of both, simulation and executable. It could help if most of the equations involved are fairly linear.

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by