On this page

One of the ways of specifying alternatives for trade study analysis is Parameter Sweep. Parameter Sweep generates alternatives automatically based on the specified parameters. After you create the Analysis Block and model an Internal Block Diagram for this Block, specify the ranges for design variables using one of four available methods described below.

In these workflows, the TradeStudyExamples model is used as an example. You can find it in the <install_root>\samples\simulation directory.


Specifying ranges by step

If you specify ranges for design variables by using this method, values of a specific property are generated according to the specified step. There are two possible outcomes:

  • If you specify a positive step (step > 0), the values of a specific property are generated starting with the specified minimum value and then increased by the specified step until the specified maximum value is reached.
  • If you specify a negative step (step < 0), the values of a specific property are generated starting with the specified maximum value and then decreased by the specified step until the specified minimum value is reached.


To specify ranges for design variables by step


  1. Open the Specification window of the Bound Reference connected to the relevant property.
  2. Specify the values of the Min, Max, and Step properties.

    Examples

    • If specified ranges are Min=1, Max=5, and Step=1, the generated values are 1, 2, 3, 4, and 5.
    • If specified ranges are Min=1, Max=2.5, and Step=-0.4, the generated values are 2.5, 2.1, 1.7, and 1.3.
    • If specified ranges are Max=10 and Step=4, the generated values are 0, 4, and 8. (If the Min property value is not specified, the default value is 0.)


Specifying ranges by a number of points

If you specify ranges for design variables by a number of points, the values of a specific property are generated starting with the specified minimum value and then increased by a calculated step according to the specified number of points until the specified maximum value is reached. 


To specify ranges for design variables by a number of points


  1. Open the Specification window of the Bound Reference connected to the relevant property.
  2. Specify the values of the MinMax, and Number Of Points properties.

    Examples

    • If specified ranges are Min=1, Max=5, and Number Of Points=3, a calculated step is 2 and generated values are 1, 3, and 5.
    • If specified ranges are Min=1, Max=2.5, and Number Of Points=6, a calculated step is 0.3 and generated values are 1, 1.3, 1.6, 1.9, 2.2, and 2.5.
    • If specified ranges are Min=-15, Max=0, and Number Of Points=4, a calculated step is 5 and generated values are -15, -10, -5, and 0.


Specifying ranges by a number of points and step

If you specify ranges for design variables by using this method, the values of a specific property are generated according to the specified step and number of points. There are two possible outcomes:

  • If you specify a positive step (step > 0), the values of a specific property are generated starting with the specified minimum value and then increased by the specified step until the number of generated values reaches the specified number of point or maximum value.
  • If you specify a negative step (step < 0), the values of a specific property are generated starting with the specified maximum value and then decreased by the specified step until the number of generated values reaches the specified number of points or minimum value.


To specify ranges for design variables by a number of points and step


  1. Open the Specification window of the Bound Reference connected to the relevant property.
  2. Specify the values of the MinMax, Number Of Points, and Step properties.

    Examples

    • If specified ranges are Min=1, Number Of Points=5, and Step=1, the generated values are 1, 2, 3, 4, and 5.
    • If specified ranges are Min=1, Max=4, Number Of Points=3, and Step=1.8, the generated values are 1 and 2.8. (The value of 4.6 is excluded because it is greater than the maximum value of 4.)
    • If specified ranges are Max=1, Number Of Points=3, and Step=-0.1, the generated values are 1, 0.9, and 0.8.


Specifying ranges by a value list

If you specify ranges for design variables by a value list, a set of specified values is used for a specific property.


To specify ranges for design variables by a value list


  1. Open the Specification window of the Bound Reference connected to the relevant property.
  2. Specify the value of the Values property.


  • If the Values property is specified together with the StepNumber Of PointsMin, or Max properties, only the Values property will be used in the parameter sweep.
  • If the Min property value is not specified, the default value of 0 (zero) is used instead.


Error handling

  • WARN: Since the minimal value of the [value name] design variable is not specified, the default value of 0 is used instead.
    The warning is shown when the Max property value is not specified in these combinations: [Min, Max, Step] or [Min, Max, Number Of Points], Step<0. Invalid values shall be excluded from the trade study analysis.

  • WARN: The maximal value of the [value name] design variable is not specified.
    If the Number Of Points property value is 1, then the Min property value is taken as an alternative result (calculating the step is not required). In addition, the warning is shown on the console.

  • WARN: Since the Number Of Points value of the [value name] design variable is equal to 1, the minimum value is used instead.
    The invalid values are excluded from the trade study analysis, and a generic warning (The [value name] design variable is specified incorrectly.) is shown on the console when:
    • The Step property is specified in real numbers (e.g., 1.5; 0.25) but the value is typed as an integer.
      Exception: the warning is not displayed if there is only a zero after the decimal point (e.g., 1.0; 5.0).
    • The Step is calculated in real numbers, but the value is typed as an integer (e.g. Min=1, Max=10, Number Of Points=10, calculated Step=0.11).
      Exception: the warning is not displayed if there is only a zero after the decimal point (e.g., 1.0; 2.0).
    • Neither the Step nor Number Of Points property value is specified.
    • Step=0
      Exception: the warning is not displayed if Number Of Points>0.
    • Number Of Points<=0
    • Min>=Max
      Exception: the warning is not displayed if Number Of Points=1.