MATLAB 2022a, Automatic model Coverage with model coloring and cumulative report generation is not happening.

1 回表示 (過去 30 日間)
In previous MATLAB versions, we used to have following options (in configurable coverage analysis):
Latest version 2022a doesn’t have any of the highlighted options, which is creating difficulties while analyzing cumulative coverage.
The requirement is to get model highlighted with coloring after we simulate the plant model, Result explorer should pop-up and cumulative report(with all the runs included) should be generated automatically
Request you to please help us with this issue.

採用された回答

Pat Canny
Pat Canny 2022 年 9 月 28 日
Those parameters in the coverage settings UI were deprecated some time ago to bring Simulink Coverage simulation "in line" with other simulation-based workflows. Which MATLAB release were you using prior to R2022a?
Are you not seeing the coverage highlighting after simulation? That should be enabled by default in R2022a. There is also the cvmodelview function to show highlighting.
You can generate a report automatically using the cvsim and cvhtml functions. Here's a code snippet from the cvsim documentation:
%openExample('slcoverage/RecordCoverageDataUsingCvsimExample')
modelName = 'slvnvdemo_cv_small_controller';
load_system(modelName)
testObj = cvtest(modelName);
testObj.settings.decision = 1;
paramStruct.AbsTol = '1e-5';
paramStruct.SaveState = 'on';
paramStruct.StateSaveName = 'xoutNew';
paramStruct.SaveOutput = 'on';
paramStruct.OutputSaveName = 'youtNew';
[covData,simOut] = cvsim(testObj,paramStruct);
cvmodelview(covData) % I added this line. It will display the model with coverage result highlighting.
cvhtml('CoverageReport.html',covData,'-sRT=0');
  2 件のコメント
Shijil
Shijil 2022 年 9 月 28 日
編集済み: Shijil 2022 年 9 月 28 日
Following are the answers for your questions:
  1. Which MATLAB release were you using prior to R2022a? - R2020a
  2. Are you not seeing the coverage highlighting after simulation? - No, maybe beacuse of the in-house script which we are using to run the model, needs a modification to accept the latest MATLAB changes.
Thanks for sharing the code snippet with details, will work on the same and get back with updates.
Thanks a lot.
Pat Canny
Pat Canny 2022 年 9 月 28 日
Thanks - just a note of clarification: the cvhmtl command can generate a report of aggregated coverage as well as "individual" (single simulation) coverage. It just needs a valid coverage data object.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCollect Coverage for Models についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by