sdo.requirements.RelationalConstraint Class
Namespace: sdo.requirements
Superclasses:
Impose relational constraint on pair of variables
Description
Use the sdo.requirements.RelationalConstraint
object
to impose a relational constraint on a pair of variables in a Simulink® model.
The variables can be any parameters in your model. You create the
requirement object, and specify the type of relation you want between
the elements of the two variables. For example, for two variables var1
and var2
,
you can specify that each element of var1
be greater
than the corresponding element of var2
.
You can use the requirement object as an input to your cost function and
use the evalRequirement
command to evaluate if
your test data satisfies the specified 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
rel_req
=
sdo.requirements.RelationalConstraintsdo.requirements.RelationalConstraint
requirement object and
assigns default values to its properties. Use dot notation to customize the properties.
Use the evalRequirement
command to evaluate if test data satisfies
the specified requirement.
specifies one or more properties using name-value
arguments. For example, rel_req
=
sdo.requirements.RelationalConstraint(Name=Value)rel_req =
sdo.requirements.RelationalConstraint(Type=">")
creates an
sdo.requirements.RelationalConstraint
object and specifies that
each data element in the first variable is strictly greater than the corresponding
element in the second variable.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes. For example, rel_req =
sdo.requirements.RelationalConstraint("Type",">")
creates an
sdo.requirements.RelationalConstraint
object and specifies that
each data element in the first variable is strictly greater than the corresponding
element in the second variable.
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