Table Of Contents

Aliasing Parameter Names in a Model Parameter File

Last Modified: June 10, 2021

Use an alias file to define syntactically correct aliases for model parameter names.

In addition to creating cleaner parameter files, aliasing parameter names can extend the reusability of a test by allowing you to simply update the alias file if you want to use the same test on a model with different parameter names.
  1. Open a formatted text file (.txt or .m).
  2. Replace the parameter names with syntactically correct aliases.
    spd-note-note
    Note  

    Each alias must start with a letter and contain only alphanumeric characters or underscores.

  3. Create a new text (.txt) file and enter the aliases and their corresponding model parameter paths in the same format you used for the model parameter file.
    spd-note-note
    Note  

    The alias file must have a .txt file extension and use the same delimiter as the parameter file with which it corresponds.

  4. Save the text files.
  5. Configure VeriStand to use the parameter alias file path based on where the original model parameter text file is called.
    Location How to enter
    Stimulus Profile Editor
    1. Open a stimulus profile.
    2. On the Edit tab, select Update Model Parameters from File.
    3. Enter the Alias File path.
    Initializing parameters
    1. Use System Explorer to apply initial values for model parameters from a .txt file.
    2. On the Simulation Models page, enter the Parameter alias file path.
    Model Parameter Manager tab
    1. Use the VeriStand Editor to import model parameters.
    2. In the Configure Parameter Import dialog box, enter the Alias File Path.
    Model Parameter Manager Workspace tool
    1. Use the Workspace to import model parameters.
    2. In the Select Model Calibration File dialog box, enter the Parameter alias file path.
  6. Set the Delimiter property to the delimiter type that both the parameter file and the alias file use.
When the feature that calls the top-level text file executes, VeriStand uses the alias file to map the aliases in the parameter file to actual model parameters.
The following examples show how to format a parameter file with aliases and its corresponding alias file.
spd-note-note
Note  

These files use a tab delimiter.

File type Example
Parameter
a     25
b     900
Alias
a     {model/environment temperature (C)}
b     {model/idle speed (RPM)}

Recently Viewed Topics