ModelAdvisor.run
Use Model Advisor to run checks on systems
Syntax
Description
ModelAdvisor.run(
runs the Model Advisor on the models or subsystems specified by
Systems,CheckIDList)Systems for the list of check IDs specified by
CheckIDList.
ModelAdvisor.run(
runs the Model Advisor for the check ID specified by Systems,{{CheckID,'InputParam',{paramName,paramValue}}})CheckID
with the input parameter setting specified by the input parameter name
paramName and the input parameter value
paramValue.
ModelAdvisor.run(Systems,{{CheckID1,'InputParam',{paramName1,paramValue1,...,paramNameN,paramValueN}},...,{CheckIDN,'InputParam',{paramName1,paramValue1,...,paramNameN,paramValueN}}})
runs the Model Advisor for one or more check IDs with the input parameter
settings specified using 'InputParam'.
The check IDs are specified by CheckID1 through
CheckIDN. For each check ID, you can specify the input
parameters for the check by using 'InputParam' with the
parameter names, paramName1 through
paramNameN, and parameter values,
paramValue1 through
paramValueN.
For example, to specify input parameters for the check Check trigger
signal names, you would use:
{'mathworks.jmaab.db_0032','InputParam',{'Follow links','off','Look
under masks','all'}}.
specifies the properties of the Model Advisor analysis using one or more
Results = ModelAdvisor.run(___,Name,Value)Name,Value pair arguments and returns the results in
Results. Use Results to view the
properties of the Model Advisor run. Use this option with one of the previous
syntaxes.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Limitations
ModelAdvisor.runpre-checks for licenses and errors out if a license is not available.ModelAdvisor.rundoes not run across model hierarchies. To run Model Advisor on a parent model and its referenced models, useAdvisor.Applicationinstead.ModelAdvisor.runonly runs Model Advisor on active variants. To run Model Advisor on both active and inactive variants, useAdvisor.Applicationwith theAnalyzeVariantsargument specified astrue.
Tips
When you run Model Advisor from the MATLAB® command line, you can log information such as errors, warnings and debug details by using the
LogVerbosityoption in theModelAdvisor.runcommand.ModelAdvisor.run('vdp',checkIDlist,'LogVerbosity','None')To specify the level of detail of the logging, you can set the
LogVerbosityoption as shown:Value of LogVerbosityLevel of Information Logging NoneNo information (default value). ConciseModerate amount of information like errors and warnings. VerboseComplete information. Additionally, you can include the
LogFileoption to save the log details to a text file.ModelAdvisor.run('vdp',checkIDlist,'LogVerbosity','Concise','LogFile','Log.txt')Note
If
LogVerbosityis set toNone(the default value), you will not be able to specify theLogFile.If you have a Parallel Computing Toolbox license and a multicore machine, Model Advisor can run on multiple systems in parallel. You can run Model Advisor in parallel mode by using
ModelAdvisor.runwith'ParallelMode'set to'On'. By default,'ParallelMode'is set to'Off'. When you useModelAdvisor.runwith'ParallelMode'set to'On', MATLAB automatically creates a parallel pool.
Alternatives
Use the Model Advisor user interface to run each system. In the user interface, you can run only one system at a time.
Create a script or function by using a
Simulink.ModelAdvisorobject to run each system one at a time.