Main Content

このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。

モデルのリファクタリング

モデリング クローンとパターンを特定してモデルを変換

モデル トランスフォーマーおよびクローン検出器を使用してモデルをリファクタリングし、モデルのコンポーネント化と可読性を改善して再利用を可能にします。

モデル トランスフォーマーを使用して次を実行します。

  • Variant Source ブロックまたは Variant Subsystem ブロックへの変換の条件を満たすモデル化パターンを特定します。Variant Subsystem ブロックと Variant Source ブロックを使用すると、バリアント選択と呼ばれるさまざまな条件式でのモデルの再利用が可能になります。アクティブなモデルでは、ユーザーのバリアント選択に従ってアクティブにした固定構造および可変コンポーネントが組み合わされています。

  • 削除の条件を満たすデータ ストア ブロックを特定します。データ ストア ブロックを削除すると、データの依存関係が明示的になるため、モデルの可読性が改善されます。

  • 共有 Prelookup ブロックおよび複数の Interpolation ブロックへの変換の条件を満たす n-D Lookup Table ブロックを特定します。この変換により、シミュレーションの効率が向上します。

  • モデル化パターンの単一の Interpolation Using Prelookup ブロックへの変換条件を満たす複数の Interpolation Using Prelookup ブロックを特定します。この変換により、生成されたコードの効率が向上します。

クローン検出器を使用して、次を実行します。

  • クローンを特定し、それらのクローンをライブラリ内のサブシステム ブロックへのリンクに置き換えたモデルを作成します。クローンをライブラリ ブロックへのリンクに置き換えると、コンポーネントの再利用が可能になります。

  • サブシステム参照を使用して、モデル内のクローンを特定して置換します。

関数

すべて展開する

mdltransformerモデル トランスフォーマーを開く
Simulink.ModelTransform.CommonSourceInterpolation.identifyCandidatesIdentify eligible Interpolation Using Prelookup blocks to transform
Simulink.ModelTransform.CommonSourceInterpolation.refactorModelReplace Interpolation Using Prelookup blocks
clonedetectionクローン検出器アプリを開く
Simulink.CloneDetection.findClonesFind clones in a model
Simulink.CloneDetection.replaceClonesReplace clones in a model
Simulink.CloneDetection.checkEquivalencyCheck equivalency of clone-replaced model and original model
Simulink.CloneDetection.highlightCloneHighlight clone in a Simulink model

クラス

すべて展開する

Simulink.ModelTransform.CommonSourceInterpolation.ResultsResults of search for eligible Interpolation Using Prelookup blocks
Simulink.ModelTransform.CommonSourceInterpolation.RefactorResultsRefactored model results
Simulink.CloneDetection.Settings Conditions for findClones function
Simulink.CloneDetection.ResultsResults of find clones
Simulink.CloneDetection.ReplacementConfigConditions for clone replacement function
Simulink.CloneDetection.ReplacementResultsResults of replace clones
Simulink.CloneDetection.EquivalencyCheckResultsResults of equivalency check

アプリ

モデル トランスフォーマーEnable model transformation by identifying and refactoring the modelling patterns to optimize the models
クローン検出器クローンを特定して置き換えることで、モデル内でモデルのリファクタリングやサブシステムの再利用を可能にする

トピック

モデル トランスフォーマー

クローン検出器