Main Content

Advisor.authoring.NegativeBlockParameterConstraint Class

Namespace: 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 Programmatically Specify Block Parameters and Properties. This property is read/write.

Block parameter for which you are specifying a constraint. For a list of block parameters, see Programmatically Specify Block Parameters and Properties. 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';

Version History

Introduced in R2018a