Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

Simulink モデル内の要件の形式化

Requirements Table ブロックを使用してシミュレーションの実行前および実行中にロジックを評価

Requirements Table ブロックを使用して実行前および実行時にロジックを評価することで、Simulink® モデル内の形式的要件を定義します。形式的要件を使用して、モデルの出力をチェックするかブロック出力を実行します。

形式的要件は、要件エディターのブロックで直接設定するか、MATLAB® でプログラムのコマンドを使用して設定します。

ブロック

Requirements Table入力条件を使用した形式的要件のモデル化 (R2022a 以降)

関数

すべて展開する

slreq.modeling.createCreate new model with Requirements Table block (R2022a 以降)
slreq.modeling.findFind Requirements Table blocks (R2022a 以降)
slreq.load要件セットまたはリンク セットの読み込み

オブジェクト

すべて展開する

RequirementsTableConfigure Requirements Table blocks (R2022a 以降)
SymbolRequirements Table ブロックのデータを構成する。 (R2022a 以降)
RequirementRowRequirements in Requirements Table block (R2022a 以降)
AssumptionRowAssumptions in Requirements Table block (R2022a 以降)

オブジェクト関数

すべて展開する

ブロック データの管理

addSymbolAdd data to Requirements Table block
findSymbolRetrieve data in Requirements Table block

ブロック行の管理

addAssumptionRowAdd assumption to Requirements Table block
addRequirementRowAdd requirement to Requirements Table block
addChildAdd child requirement or assumption to Requirements Table block
getRequirementRowsRetrieve requirements in Requirements Table block
getAssumptionRowsRetrieve assumptions in Requirements Table block
getChildrenRetrieve child requirements and assumptions in Requirements Table block
slreq.getCurrentObjectGet selected objects in Requirements Editor, Requirements Browser, or Requirements Table block
clearClear row in Requirements Table block
removeRowRemove Requirements Table block row

ブロック列の管理

hideAssumptionColumnHide Precondition column in Assumptions tab
hideRequirementColumnHide columns in Requirements tab
showAssumptionColumnShow Precondition column in Assumptions tab
showRequirementColumnShow columns in Requirements tab

演算子

すべて展開する

時相論理

durationTime during which condition is valid in Requirements Table block
getPrevious前のデータの値
isStartupWhether simulation time is 0 in Requirements Table block
tシミュレーションの経過時間

変更の検出

hasChangedDetect change in data since last time step in Requirements Table block
hasChangedFromDetect change in data from specified value in Requirements Table block
hasChangedToDetect change in data to specified value in Requirements Table block

文字列の作成、連結、変換

str2doublestring を倍精度値に変換する
string値を string に変換する
plusConcatenate strings in Requirements Table block

文字列のプロパティの決定

isletterDetermine which characters are letters in Requirements Table block
isspaceDetermine which characters are spaces in Requirements Table block
isstringDetermine if input is string in Requirements Table block
strlengthDetermine length of string in Requirements Table block
containsstring に部分文字列が含まれているかどうかを判別する

文字列の文字の検出と置き換え

containsstring に部分文字列が含まれているかどうかを判別する
endsWithstring が部分文字列で終了しているかどうかを判別する
matchesDetermine if two strings match in Requirements Table block
replace部分文字列を検索して置き換え
replaceBetweenReplace substrings between start and end points in Requirements Table block
startsWithstring が部分文字列で開始しているかどうかを判別する
strfindstring 内の部分文字列を検索する
strrepFind and replace substrings in Requirements Table block

文字列の編集

eraseDelete substrings within strings in Requirements Table block
eraseBetweenDelete substring between start and end points in Requirements Table block
extractAfterExtract substring after position in Requirements Table block
extractBeforeExtract substring before position in Requirements Table block
insertAfterInsert string after substring in Requirements Table block
insertBeforeInsert string before substring in Requirements Table block
lowerConvert string to lowercase in Requirements Table block
upperConvert a string to uppercase in Requirements Table block
reversestring に含まれている文字の順序を逆にする
stripstring から先頭および末尾の文字を削除する
strtrimstring から先頭および末尾の空白を削除する

文字列の比較

matchesDetermine if two strings match in Requirements Table block
strcmpstring を比較する (大文字小文字の区別あり)
strcmpistring を比較する (大文字小文字の区別なし)
strncmpCompare first N characters of strings in Requirements Table block (case sensitive)
strncmpiCompare first N characters of strings in Requirements Table block (case insensitive)

トピック

要件の作成と管理

要件データの設定

要件があるモデルのテスト

トラブルシューティング

矛盾する形式的要件セットおよび不完全な形式的要件セットの特定

Simulink Design Verifier™ を使用して、矛盾する要件セットや不完全な要件セットおよび書き込み前の読み取りの問題を見つける。 (R2022a 以降)

Debug Requirements Table Blocks

Debug Requirements Table block requirements during simulation. (R2023a 以降)