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
Output Arguments
Limitations
ModelAdvisor.run
does not run across model hierarchies. To run Model Advisor on a parent model and its referenced models, useAdvisor.Application
instead.ModelAdvisor.run
only runs Model Advisor on active variants. To run Model Advisor on both active and inactive variants, useAdvisor.Application
with theAnalyzeVariants
argument 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
LogVerbosity
option in theModelAdvisor.run
command.ModelAdvisor.run('vdp',checkIDlist,'LogVerbosity','None')
To specify the level of detail of the logging, you can set the
LogVerbosity
option as shown:Value of LogVerbosity
Level of Information Logging None
No information (default value). Concise
Moderate amount of information like errors and warnings. Verbose
Complete information. Additionally, you can include the
LogFile
option to save the log details to a text file.ModelAdvisor.run('vdp',checkIDlist,'LogVerbosity','Concise','LogFile','Log.txt')
Note
If
LogVerbosity
is 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.run
with'ParallelMode'
set to'On'
. By default,'ParallelMode'
is set to'Off'
. When you useModelAdvisor.run
with'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.ModelAdvisor
object to run each system one at a time.