Main Content

Advisor.authoring.NegativeBlockTypeConstraint 类

命名空间: Advisor.authoring
超类:

创建模型顾问约束以检查不受支持的模块

描述

Advisor.authoring.NegativeBlockTypeConstraint 类的实例定义模型不能包含的模块。

构造

constraint = Advisor.authoring.NegativeBlockTypeConstraint 创建此类的一个实例。

属性

全部展开

模块类型约束的唯一标识符。此属性是可读取/写入的。

由以下字段组成的结构:

  • 'BlockType'

  • 'MaskType'

不受支持的模块类型列表。此属性是可读取/写入的。有关 MaskType 字段的详细信息,请参阅封装编辑器概述封装参数

使用 addPreRequisiteConstraintID 方法指定为前提条件的约束的 ID。如果不满足某个前提条件,模型顾问不会检查具有该前提条件的约束。此属性是只读的。

示例

指定不受支持的模块类型

以下命令指定模型不能包含 Integrator 模块、Rate Transition 模块或具有指定封装的 Constant 模块:

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};

版本历史记录

在 R2018a 中推出