Shared Simulink Cache Files doesn't work
9 ビュー (過去 30 日間)
古いコメントを表示
Hello,
i using Matlab "R2020b" and i have problem in Cache files (.slxc),
i have a model Simulink Contains many Referance Models and when i compile the Model it take time ~5h and after the compiling of the Model, Matlab generate a Cache files succufly in my Computer for set up the speed of the compilation (~1h),but when i want to share the Cache files with another person it doesn't work in his Computer and the Model Simulink take many times to finish the Compilation (~5h again) and after the Compilation it doesn't generate another Cache files but it Modify on the existing Cache files that i generated
knowing that we use the Same Parmeters and the Version
Dignostic in My Computer:
Dignostic in the Computer of the Person :
and to Configure the Path of existing Cache files we use this scripte :
RootPath = pwd;
Cachefile_Path = fullfile(RootPath,'Cashe_file');
Simulink.fileGenControl('set', 'CacheFolder', Cachefile_Path );
set_param(0, 'CacheFolder', fullfile(RootPath,'Cashe_file'))
Can you guys help me to resolve this issue pls
Thank you,
0 件のコメント
採用された回答
Shubham
2024 年 3 月 19 日
Hey Younes,
I understand that you are trying to share Simulink cache files to speedup simulation however Simulink is rebuilding the model. It seems that the rebuild was caused by changes in "Code Replacement Library". Please check if the parameters are same on both the machines:
Configuration Parameter -> Code Generation -> Interface -> Code replacement library.
The script for configuring the path for existing cache file seems correct, however you can refer to the following MATLAB Answers post for configuring the Simulink cache folder here: https://www.mathworks.com/matlabcentral/answers/535769-how-can-i-change-the-location-where-generated-simulink-files-are-placed
Make sure that you are matching the requirements for reusing the Simulink Cache files such as using the same MATLAB release, platform and compiler. For more details please refer to this Article explaining the workflows and best practises involved while sharing Simulink Cache files: https://www.mathworks.com/company/technical-articles/agile-model-based-design-accelerating-simulink-simulations-in-continuous-integration-workflows.html
Since you have mentioned that your model contains several reference models leading to high compilation time, I would suggest you to enable "parallel model reference builds" option provided in the Model Referencing tab as shown in the above mentioned article. You can perform checks for parallel build by navigating to:
DEBUG -> Performance Advisor -> Simulation -> checks that require Update Diagram
For more information on parallel builds you can refer to the following documentation:
You can also refer to the workflow example for sharing Simulink Cache in this File Exchange submission by MathWorks: https://www.mathworks.com/matlabcentral/fileexchange/100376-workflow-for-simulink-cache-and-jenkins
You may find the following documentation useful to your query as well:
I hope this helps !
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!