Documentation Center

  • Trial Software
  • Product Updates

Contents

Advisor.authoring.generateConfigurationParameterDataFile

Package: Advisor.authoring

Generate XML data file for custom configuration parameter check

Syntax

  • Advisor.authoring.generateConfigurationParameterDataFile(dataFile,source) example
  • Advisor.authoring.generateConfigurationParameterDataFile(dataFile,source,Name,Value) example

Description

example

Advisor.authoring.generateConfigurationParameterDataFile(dataFile,source) generates an XML data file named dataFile specifying the configuration parameters for source. The data file uses tagging to specify the configuration parameter settings you want. When you create a check for configuration parameters, you use the data file. Each model configuration parameter specified in the data file is a subcheck.

example

Advisor.authoring.generateConfigurationParameterDataFile(dataFile,source,Name,Value) generates an XML data file named dataFile specifying the configuration parameters for source. It also specifies additional options by one or more optional Name,Value arguments. The data file uses tagging to specify the configuration parameter settings you want. When you create a check for configuration parameters, you use the data file. Each model configuration parameter specified in the data file is a subcheck.

Examples

expand all

Create data file for configuration parameter check

Create a data file with all the configuration parameters. You use the data file to create a configuration parameter.

model = 'vdp';
dataFile = 'myDataFile.xml';
Advisor.authoring.generateConfigurationParameterDataFile( ...
               dataFile, model);

Data file myDataFile.xml has tagging specifying subcheck information for each configuration parameter. myDataFile.xml specifies the configuration parameters settings you want. The following specifies XML tagging for configuration parameter AbsTol. If the configuration parameter is set to 1e-6, the configuration parameter subcheck specified in myDataFile.xml passes.

<!-- Absolute tolerance: (AbsTol)-->
  <PositiveModelParameterConstraint>
     <parameter>AbsTol</parameter>
     <value>1e-6</value>
     </PositiveModelParameterConstraint>

To specify configuration parameter settings you do not want, see Data File for Configuration Parameter Check.

Create data file for solver pane configuration parameter check with fix action

Create a data file with configuration parameters for the solver pane. You use the data file to create a solver pane configuration parameter check with fix actions.

model = 'vdp';
dataFile = 'myDataFile.xml';
Advisor.authoring.generateConfigurationParameterDataFile( ...
               dataFile, model, 'Pane', 'Solver', 'FixValues', true);

Data file myDataFile.xml has tagging specifying subcheck information for each configuration parameter. myDataFile.xml specifies the configuration parameters settings that you want. The following specifies XML tagging for configuration parameter AbsTol. If the configuration parameter is set to 1e-6, the configuration parameter subcheck specified in myDataFile.xml passes. If the subcheck does not pass, the check fix action modifies the configuration parameter to 1e-6.

<!-- Absolute tolerance: (AbsTol)-->
  <PositiveModelParameterConstraint>
     <parameter>AbsTol</parameter>
     <value>1e-6</value>
     <fixvalue>1e-6</fixvalue>
     </PositiveModelParameterConstraint>

To specify configuration parameter settings you do not want, see Data File for Configuration Parameter Check.

Input Arguments

expand all

dataFile — Name of data file to createstring

Name of XML data file to create, specified as a string.

Example: 'myDataFile.xml'

source — Name of model or configuration setstring | Simulink.ConfigSet

Name of model or Simulink.ConfigSet object used to specify configuration parameters

Example: 'vdp'

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Pane', 'Solver', 'FixValues', true specifies a dataFile with solver pane configuration parameters and fix tagging.

'Pane' — Limit the configuration parameters in the dataFileSolver | Data Import/Export | Optimization | Diagnostics | Hardware Implementation | Model Referencing | Code Generation

Option to limit the configuration parameters in the data file to the pane specified as the comma-separated pair of 'Pane' and one of the following:

  • Solver

  • Data Import/Export

  • Optimization

  • Diagnostics

  • Hardware Implementation

  • Model Referencing

  • Code Generation

Example: 'Pane','Solver' limits the dataFile to configuration parameters on the solver pane.

Data Types: char

'FixValues' — Create fix tagging in the dataFilefalse | true

Setting FixValues to true provides the dataFile with fix tagging. When you generate a custom configuration parameter check using a dataFile with fix tagging, each configuration parameter subcheck has a fix action. Specified as the comma-separated pair of 'FixValues' and either true or false.

Example: 'FixValues,true specifies fix tagging in the dataFile.

Data Types: logical

Was this topic helpful?