sdo.requirements.FunctionMatching class
Package:sdo.requirements
Superclasses:
Impose function matching constraint on variable
Description
Use thesdo.requirements.FunctionMatching
object to impose a function matching constraint on the values of a variable in a Simulink®model. The variable can be a vector, matrix, or a multidimensional array that is a parameter in your model, such as the data of a lookup table in your model. You create the requirement object, and specify the linear or quadratic function that you want the variable to match. For example, for a two-dimensional variable, you can specify that test data from dependent variableV
match a linear function of independent variablesX1
andX2
:
Where,a0
,a1
, anda2
are the fit-coefficients, andX1
andX2
are vectors.
You use theevalRequirement
method to evaluate whether your test data satisfies the specified requirement, and specify the independent variable vectors as inputs to the method. The software calculates the fit-coefficients using the independent variables and test data and then calculates the error between the test data and the specified function of the independent variables.
You can use the requirement object as an input to yourcost functionand use theevalRequirement
command in the cost function to evaluate the requirement. You can then use the cost function andsdo.optimize
to perform response optimization, subject to satisfaction of the specified requirement. If you are performing sensitivity analysis, after you generate parameter samples, you can use the cost function andsdo.evaluate
to evaluate the requirement for each generated sample.
Construction
creates anrequirement
= sdo.requirements.FunctionMatchingsdo.requirements.FunctionMatching
requirement object and assigns default values to its properties. Use dot notation to customize the properties. Use theevalRequirement
command to evaluate whether test data satisfies the specified requirement.
creates the requirement object with additional options specified by one or morerequirement
= sdo.requirements.FunctionMatching(Name,Value
)Name,Value
pair arguments.Name
is aproperty nameandValue
is the corresponding value.Name
must appear inside single quotes (''
). You can specify several name-value pair arguments in any order asName1,Value1,...,NameN,ValueN
.
Input Arguments
Name-Value ArgumentsSpecify optional pairs of arguments asName1=Value1,...,NameN=ValueN
, whereName
is the argument name andValue
is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.
Before R2021a, use commas to separate each name and value, and encloseName
in quotes.
UseName,Value
arguments to specifypropertiesof the requirement object during object creation. For example,requirement = sdo.requirements.FunctionMatching('Type','quadratic')
creates ansdo.requirements.FunctionMatching
object and specifies the function to be matched as quadratic.
Properties
Methods
evalRequirement | Evaluate satisfaction of function matching requirement |
Copy Semantics
Handle. To learn how handle classes affect copy operations, seeCopying Objects.