MATLAB ヘルプ センター
クラス: Advisor.authoring.CompositeConstraint 名前空間: Advisor.authoring
制約を複合制約に追加する
addConstraintID(ID_1)
複合制約に追加する制約 ID を指定します。
addConstraintID(ID_1) は、モデル アドバイザーが CompositeConstraint オブジェクトの一部としてチェックする制約 ID ID_1 を指定します。
ID_1
CompositeConstraint
例
すべて展開する
複合制約の一部として指定できるルート制約オブジェクトを作成するには、以下のクラスを使用します。
Advisor.authoring.PositiveBlockParameterConstraint
Advisor.authoring.NegativeBlockParameterConstraint
Advisor.authoring.PositiveBlockTypeConstraint
Advisor.authoring.NegativeBlockTypeConstraint
以下のコマンドでは、Multiport Switch ブロックの複合制約を指定します。
3 つの PositiveBlockParameter 制約オブジェクトを作成します。
PositiveBlockParameter
c1 = Advisor.authoring.PositiveBlockParameterConstraint(); c1.ID = 'ID_A1'; c1.BlockType = 'MultiPortSwitch'; c1.ParameterName = 'DataPortOrder'; c1.SupportedParameterValues = {'Specify indices'}; c1.ValueOperator = 'eq'; c2 = Advisor.authoring.PositiveBlockParameterConstraint(); c2.ID = 'ID_A2'; c2.BlockType = 'MultiPortSwitch'; c2.ParameterName = 'DataPortForDefault'; c2.SupportedParameterValues = {'Additional data port'}; c2.ValueOperator = 'eq'; c3 = Advisor.authoring.PositiveBlockParameterConstraint(); c3.ID = 'ID_A3'; c3.BlockType = 'MultiPortSwitch'; c3.ParameterName = 'DiagnosticForDefault'; c3.SupportedParameterValues = {'None'}; c3.ValueOperator = 'eq';
addPreRequisiteConstraintID メソッドを使用して、c1 をチェック制約 c2 および c3 の前提条件にします。
addPreRequisiteConstraintID
c1
c2
c3
c2.addPreRequisiteConstraintID('ID_1'); c3.addPreRequisiteConstraintID('ID_2');
Rate Transition ブロックが c2 と c3 の両方の制約を満たしていない場合にブロックがこのチェックの違反になることを指定する複合制約を作成します。
CC = Advisor.authoring.CompositeConstraint(); CC.addConstraintID('ID_A2'); CC.addConstraintID('ID_A3'); CC.CompositeOperator = 'and';
R2018a で導入
PositiveModelParameterConstraint | NegativeModelParameterConstraint | PositiveBlockParameterConstraint | NegativeBlockParameterConstraint | PositiveBlockTypeConstraint | NegativeBlockTypeConstraint | CompositeConstraint
PositiveModelParameterConstraint
NegativeModelParameterConstraint
PositiveBlockParameterConstraint
NegativeBlockParameterConstraint
PositiveBlockTypeConstraint
NegativeBlockTypeConstraint
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ