Advisor.authoring.NegativeBlockTypeConstraint class

Package: Advisor.authoring
Superclasses:

Create a Model Advisor constraint to check for unsupported blocks

Description

Instances of Advisor.authoring.NegativeBlockTypeConstraint class define blocks that a model must not contain.

Construction

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

Properties

expand all

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

Structure consisting of these fields:

  • 'BlockType'

  • 'MaskType'

List of unsupported block types. This property is read/write. For more information on the MaskType field, see Mask Editor Overview (Simulink) and Mask Parameters (Simulink).

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-only.

Examples

Specify Unsupported Block Types

These commands specify that a model cannot contain Rate Transition and Integrator blocks and Constant blocks with a specified mask:

c1=Advisor.authoring.NegativeBlockTypeConstraint;
c1.ID='ID_1';
s1=struct('BlockType','Integrator','MaskType','');
s2=struct('BlockType','RateTransition','MaskType','');
s3=struct('BlockType','Constant','MaskType','Stateflow');
c1.UnsupportedBlockTypes={s1;s2;};

Introduced in R2018a