Adding a Parametric Sweep
In addition to the study step that defines a study type, you can add a parametric sweep to the study node. This is a study step that does not generate equations and can only be used in combination with other study steps. You can formulate the sequence of problems that arise when some parameters are varied in the model.
To add a parametric sweep to the study node, enter:
study.feature.create(<ftag>, 'Parametric')
where study is a link to a valid study node where to include the parametric sweep defined with the tag <ftag>.
To add one or several parameters to the sweep, enter the command:
study.feature(<ftag>).setIndex('pname', <pname>, <idx>)
where <pname> is the name of the parameter to use in the parametric sweep and <idx> the index number of the parameter. Set the <idx> to 0 to define the first parameter, 1 to define the second parameter, and so on.
Set the list of the parameter values with the command:
study.feature(<ftag>).setIndex('plistarr', <pvalue>, <idx>)
where <pvalue> contains the list of parameter values defined with either a string or with a double array, and <idx> is the index number of the parameter and uses the same value as for the parameter name.
If there are several parameters listed in the parametric sweep node, select the type of sweep by entering:
study.feature(<ftag>).set('sweeptype', type)
where type is a string defining the sweep type, it can take either the value 'filled' or 'sparse', referring to all combinations or specified combinations of the parameter values, respectively.