- make the parameters for INputX and InputY to be tunable workspace parameters. https://www.mathworks.com/help/xpc/ug/tuning-block-parameters-and-model-parameters.html
Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
How can I stop the recompile of the model after first run to quicken the simulation time ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am making a game using unity and I have a simulink model that recieves cooridinates and sends data from which the unity "player" moves. and as figures this needs simulink to be very quick in simulating the model and giving the output so that it can nearly sync with unity.. but the problem is simulink simulation is slow..
I update parameters using set_param then use sim function to run the simulation with the new parameters but each time takes around 2.5 3 secs which causes a response delay to unity thus incorrect/delayed motion in unity.
I tried using model reference and running the model in accelerator mode which seemed to cause the same issue..
so is there any possible way to eliminate this delay.. it should be atleast less than a second to make the motion the least good.
here's the part responsible in my matlab code:
0 commentaires
Réponses (1)
Mark McBroom
le 14 Mai 2020
2. Enable "Fast Restart" https://www.mathworks.com/help/simulink/ug/fast-restart-workflow.html
3. Alternately, you should be able to switch model to accelerated mode, and it should not recompile model when you change the tunable parameter.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!