This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Advisor.authoring.NegativeBlockParameterConstraint class

Package: Advisor.authoring
Superclasses:

Create a Model Advisor constraint to check for unsupported block parameter values

Description

Instances of Advisor.authoring.NegativeBlockParameterConstraint class define unsupported values for specified block parameters.

Construction

constraint = Advisor.authoring.NegativeBlockParameterConstraint creates an instance of this class.

Properties

expand all

Unique identifier for the negative block constraint. This property is read/write.

Block that contains the parameter for which you are specifying a constraint. For a list of block types, see Block-Specific Parameters (Simulink). This property is read/write.

Block parameter for which you are specifying a constraint. For a list of block parameters, see Block-Specific Parameters (Simulink). This property is read/write.

List of unsupported values for the block parameter specified by the BlockType and ParameterName fields. This property is read/write.

To specify one or more unsupported values, use these operators:

  • 'eq'

  • 'or'

  • 'lt'

  • 'gt'

  • 'ge'

  • 'le'

  • 'range'

  • 'regex'

This property is read/write. For more information on the regex operator, see regexp.

IDs of constraints that you specify as prerequisites by using the addPreRequisiteConstraintID method. If a prerequisite is not satisfied, the Model Advisor does not check the constraint that has the prerequisite. This property is read/write.

Examples

Specify Unsupported Block Parameter Values

For a Constant block, these commands specify that one or four values are unsupported for the Value parameter:

c1=Advisor.authoring.NegativeBlockParameterConstraint;
c1.ID='ID_1';
c1.BlockType='Constant';
c1.ParameterName='Value';
c1.UnsupportedParameterValues={'1','4'};
c1.ValueOperator='or';

Introduced in R2018a