필터 지우기
필터 지우기

Why does my Simulink model take so long to run?

조회 수: 31 (최근 30일)
Jeremy
Jeremy 2018년 9월 19일
답변: Kazem 2024년 1월 10일
I am working with a large but new-to-me Simulink model in MatLab 2017A. This model takes over 26 minutes to run, which makes it very difficult to work with. I turned on the model profiler (set_param( model_name, 'Profile', 'on') before running it, and got a profile report starting with...
It is telling me that virtually all of the time is in the "compileAndLinkPhase", which makes sense with the text I see on the status bar as it runs, but it doesn't break it down any farther. Is there any setting or tool I could use to determine why this phase takes so long? Perhaps getting a specific part of the model takes too much time to compile, or a specific link takes too much time to process? Anything that tells me what it is about the model which takes so long to compile and/or link may be helpful.

답변 (2개)

Sara Nadeau
Sara Nadeau 2018년 9월 19일
편집: Sara Nadeau 2018년 9월 19일
Hi Jeremy!
Sounds like accelerator mode could help you. You can find details about Accelerator mode in the documentation.
This is the landing page for learning about Acceleration: https://www.mathworks.com/help/simulink/acceleration.html
And here's a topic to get you started: https://www.mathworks.com/help/simulink/ug/what-is-acceleration.html
I hope this helps!
  댓글 수: 1
Sara Nadeau
Sara Nadeau 2018년 9월 19일
Additionally, more to the point of your question, I hope this list of factors that affect performance can help you identify model changes that might decrease the simulation time: https://www.mathworks.com/help/simulink/ug/speed-up-simulation.html
And there's also Fast Restart which only performs the compile stage on the first simulation you run! https://www.mathworks.com/help/simulink/ug/fast-restart-workflow.html

댓글을 달려면 로그인하십시오.


Kazem
Kazem 2024년 1월 10일
You can use excludedModels option to exclude some reference blocks for big project.
testObj.modelRefSettings.excludedModels = ["A","B","C","D" .."Z"];

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by