How can I run a Model Advisor subcheck programmatically?

1 visualización (últimos 30 días)
I am running Model Advisor check mathworks.maab.jc_0281 programmatically. The check has input parameters corresponding to different subchecks (jc_0281_a and jc_0281_b). How can I choose which subcheck to run from the command line?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 15 de Mzo. de 2021
You can use the syntax mentioned in this documentation page to run those subchecks programmatically:
The way it works is you use the 'InputParams' optional argument, pass the subcheck name, and then pass an index corresponding to the subcheck options. For instance, if you wanted to run jc_0281_a1 and disable jc_0281_b, then you would write:
% select jc_0281_a1 and "disable" jc_0281_b
checkIDList = {{'mathworks.jmaab.jc_0281','InputParam',{'jc_0281_a', 1, 'jc_0281_b', 0}}};
sys = 'sldemo_auto_climatecontrol/Heater Control';
ModelAdvisor.run(sys, checkIDList);
You can tell which index corresponds to which option from the order in the Model Advisor Configuration Editor:

Más respuestas (0)

Categorías

Más información sobre Check Model Compliance en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by