メインコンテンツ

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

個々のシミュレーションの実行

Simulink® エディターから直接または MATLAB® コマンド プログラムからプログラムにより個々のシミュレーションを個別に実行および制御

モデルをシミュレーションすると、モデル化のプロセスを通じて作成するアルゴリズムの結果が示されます。シミュレーションのペーシング、モデル パラメーターの調整、シミュレーションの停止または一時停止、端子の値の表示によりシミュレーションを操作して、モデルの設計を評価できます。シミュレーションによって、モデルの設計や動作を把握できます。

モデルを対話的にシミュレートするには、Simulink ツールストリップで [実行] ボタンをクリックするか、MATLAB コマンド ウィンドウまたは MATLAB スクリプトのプログラムで simset_param などの関数を使用します。

並列シミュレーションおよびバッチ シミュレーションの実行の詳細については、複数のシミュレーションの実行を参照してください。

モデル設定

すべて展開する

入力最上位の入力端子を使用してシミュレーション用の外部入力データを読み込むオプション
初期状態Option to specify initial model state or operating point for simulation
最終状態Option to log final state values
最終の操作点を保存Option to save complete model operating point when simulation is paused or stopped
異なるリリースの操作点オブジェクトDiagnostic action to take if initial operating point was generated in different release
操作点のインターフェイス チェックサムの不一致Diagnostic action to take if model interface checksum does not match interface checksum of initial operating point
操作点のコンテンツ チェックサムの不一致Diagnostic action to take if model contents checksum does not match contents checksum of initial operating point (R2025a 以降)
初期状態が配列Diagnostic action to take when initial state for model is specified as array

ツール

シミュレーション ペーシング オプションSlow simulation to a specified ratio of simulation time to wall clock time

関数

すべて展開する

simSimulink モデルのプログラムによるシミュレーションの実行とスクリプト化
set_paramSimulink パラメーターの値を設定
get_paramパラメーターの名前と値の取得
slsim.allowedModelChangesDetermine changes you can make to model based on simulation status (R2022b 以降)
initializeInitialize simulation represented by Simulation object (R2024a 以降)
pausePause active simulation represented by Simulation object (R2024a 以降)
resumeContinue paused simulation represented by Simulation object (R2024a 以降)
setBlockParameterSet block parameter values for simulation using SimulationInput or Simulation object
setModelParameterSet model parameter values for simulation using SimulationInput or Simulation object
setExternalInputSimulationInput オブジェクトまたは Simulation オブジェクトを使用して、最上位の入力端子の外部入力データを指定する
setInitialStateSpecify initial state for simulation using SimulationInput or Simulation object
setPostSimFcn 各シミュレーションの完了後に実行する MATLAB 関数を設定
setPreSimFcnSimulink.SimulationInput オブジェクトで各シミュレーションを開始する前に実行する MATLAB 関数を指定する
setVariableSimulationInput オブジェクトまたは Simulation オブジェクトを使用してシミュレーション用の変数値を設定する
setVariantConfigurationSet variant configuration for simulation using SimulationInput object (R2024a 以降)
getVariantConfigurationGet name of variant configuration from SimulationInput object (R2024a 以降)
startStart simulation represented by Simulation object (R2024a 以降)
stepAdvance simulation represented by Simulation object by specified amount (R2024a 以降)
stopStop simulation represented by Simulation object (R2024a 以降)
terminateTerminate simulation represented by Simulation object (R2024a 以降)
Simulink.BlockDiagram.getInitialStateブロック線図から初期状態データを取得する
get Stateflow チャート、MATLAB System ブロック、S-Function の操作点情報を取得
setStateflow チャート、MATLAB System ブロック、S-Function の操作点情報を設定
findSimulink.SimulationOutput オブジェクトのプロパティの照会とアクセス
getSimulink.SimulationOutput オブジェクト内のシミュレーション結果へのアクセス
removePropertyRemove property from Simulink.SimulationOutput object
setUserDataSimulink.SimulationOutput オブジェクト内のメタデータに対するデータの追加
setUserStringSimulink.SimulationOutput オブジェクト内のメタデータに対する string の追加
whoSimulink.SimulationOutput オブジェクトの編集可能なプロパティの名前を取得

オブジェクト

すべて展開する

SimulationControl simulation execution and tune variable, block parameter, and model parameter values (R2024a 以降)
Simulink.SimulationInput複数または個々のシミュレーション用にモデルを変更する Simulink.SimulationInput オブジェクトを作成する
Simulink.op.ModelOperatingPointComplete information that represents model operating point in simulation
Simulink.SimulationOutputシミュレーション出力とメタデータへのアクセス
Simulink.SimulationMetadataInformation about model, environment, execution, and timing of simulation

トピック

基本的なシミュレーションの実行

シミュレーションの解析

高速リスタートによる反復的なシミュレーションの実行