User`s guide

Create Check for Model Configuration Parameters
25-17
Create Data File for Diagnostics Pane Configuration Parameter Check
This example shows how to create a data file for Diagnostics pane model configuration
parameter check that warns when:
Algebraic loop is set to none
Minimize algebraic loop is not set to error
Block Priority Violation is not set to error
In the example, to create the data file, you use the
Advisor.authoring.generateConfigurationParameterDataFile function.
1
At the command prompt, type vdp.
2
In the model window, select Simulation > Model Configuration Parameters. In
the Diagnostics pane, set the configuration parameters as follows:
Algebraic loop to none
Minimize algebraic loop to error
Block Priority Violation to error
3
Use Advisor.authoring.generateConfigurationParameterDataFile to
create a data file specifying configuration parameter constraints in the Diagnostics
pane. Additionally, to create a check with a fix action, set FixValue to true. At the
command prompt, type:
model=’vdp’;
dataFileName = ’ex_DataFile.xml’;
Advisor.authoring.generateConfigurationParameterDataFile(dataFileName,...
model, 'Pane', 'Diagnostics', 'FixValues', true);
4
In the Command Window, select ex_DataFile.xml. The data file opens in the
MATLAB editor. For information about the data file syntax, see “Data File for
Configuration Parameter Check” on page 25-22.
The Minimize algebraic loop (command-line:
ArtificialAlgebraicLoopMsg) configuration parameter tagging specifies
a value of error with a fixvalue of error. When you run the configuration
parameter check using ex_DataFile.xml, the check fails if the Minimize
algebraic loop setting is not error. The check fix action modifies the setting to
error.
The Block Priority Violation (command-line:BlockPriorityViolationMsg)
configuration parameter tagging specifies a value of error with a