Main Content

Advisor.authoring.NegativeBlockTypeConstraint Class

Namespace: 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 and Mask Parameters.

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 Integrator blocks, Rate Transition blocks, or 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;s3};

Version History

Introduced in R2018a