sdo.requirements.FunctionMatching Class
Namespace: sdo.requirements
Superclasses:
Impose function matching constraint on variable
Description
Use the sdo.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 variable V
match
a linear function of independent variables X1
and X2
:
Where, a0
, a1
,
and a2
are the fit-coefficients,
and X1
and X2
are
vectors.
You use the evalRequirement
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 your cost function and
use the evalRequirement
command in the cost function
to evaluate the requirement. You can then use the cost function and sdo.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 and sdo.evaluate
to
evaluate the requirement for each generated sample.
Construction
creates an
match_req
=
sdo.requirements.FunctionMatchingsdo.requirements.FunctionMatching
requirement object and assigns
default values to its properties. Use dot notation to customize the properties. Use the
evalRequirement
command to evaluate whether test data satisfies
the specified requirement.
specifies one or more properties using name-value
arguments. For example, match_req
=
sdo.requirements.FunctionMatching(Name=Value)match_req =
sdo.requirements.FunctionMatching(Type="quadratic")
creates an
sdo.requirements.FunctionMatching
object and specifies the function
to be matched as quadratic.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes. For example, match_req =
sdo.requirements.FunctionMatching("Type","quadratic")
creates an
sdo.requirements.FunctionMatching
object and specifies the function
to be matched as quadratic.
Properties
Methods
copy | Copy design requirement |
get | Get design requirement property values |
set | Set design requirement property values |
evalRequirement | Evaluate design requirement |
Copy Semantics
Handle. To learn how handle classes affect copy operations, see Copying Objects.
Examples
Version History
Introduced in R2016b