Advisor.authoring.generateConfigurationParameterDataFile

Package: Advisor.authoring

Generate XML data file for custom configuration parameter check

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

collapse all

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>

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>

Input Arguments

collapse all

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

Example: 'myDataFile.xml'

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 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.

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

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

Introduced in R2014a