ModelAdvisor does not take into account Model_just​ification.​json. How to get UUID of a rule?

18 次查看(过去 30 天)
I use Matlab R2022b. I have a Model_justification.json containing justifications for failed rules in ModelAdvisor. But when I run ModelAdvisor again. It does not take into account this jusfication file.
In justification file, there are UUID for rules failed. I would like to know how to get these UUID?
Thank you.

回答(2 个)

Sivsankar
Sivsankar 2024-11-26
In MATLAB R2022b the Model Advisor does not have a feature to load an already created justification file of “json“ format. You can only enter rationale for the justifications. Refer the following documentation to learn more:
However, in the latest version of MATLAB, the Model Advisor allows you to load a justification file. Leverage the following documentation to understand how to load a justification file :
To get the IDs of the failed checks, you’ll need to create a script to run the Model Advisor programmatically and get the results. For that, you’ll need to create a Model Advisor Application object, set your model and run the Model Advisor App. You can fetch the results of the analysis using ‘getResults’ function. You can leverage the following MathWorks documentation to learn more about this function and how to implement it.
Hope this helps!
  1 个评论
Van Cuong
Van Cuong 2024-11-26
编辑:Van Cuong 2024-11-26
Hi Sivsankar,
Thank you for your answers.
The justificaition file aims to be reused for next Simulink Checks, isn't it? The problem here is that for some models, Model Advisor can reuse this file, but in other models, Model Advisor cannot reuse. For these models, I do some tests. I run Model Advisor, add justifications that generate json file. I clear all temporary files and just keep json file of justification. I run again Model Advisor, there is no justification in Model Advisor report. I need to add again justifications. I work on Matlab 2022b.
I did talk about ID of failed checks, but UUID that you can find in justification file for every justified failed checks. For example in a json file, I have:
"type":"advisor.filter.BlockFilter","uuid":"22c09124-6472-4d88-9e22-b148d78eb18a"
Thanks.

请先登录,再进行评论。


Mandeep Panesar
Mandeep Panesar 2025-2-10,13:26
编辑:Mandeep Panesar 2025-2-10,13:26
I think I have similar problem, using MATLAB 2024b. The justificaitons we previsouly saved to do not always load again when re-running checks. We are having to repeat adding justifications but even though they are stored in the .json file they won't appear in the model advisor report file. If we save a new version of the model file, do we need to create a new justificaiton file? is there way existing justifications apply? thanks.

类别

Help CenterFile Exchange 中查找有关 Run Model Advisor Checks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by