Main Content

複数のシミュレーションの実行

モデルへの一連の入力を指定し、関数 parsim、関数 batchsim、または Simulink® の [複数のシミュレーション] パネルを使ってこれらの入力で複数のシミュレーションを実行する

複数の並列シミュレーションおよび大規模データのログ記録が含まれるワークフローについて、関数 parsim または batchsim を使用するか、Simulink エディターの [複数のシミュレーション] パネルでシミュレーションを実行できます。

Parallel Computing Toolbox™ のライセンスをお持ちの場合、関数 parsim を使用してシミュレーションを並列実行できます。この関数は複数のシミュレーションを並列ワーカーに分散させて、全体のシミュレーション時間を短縮します。関数 parsim を Parallel Computing Toolbox で使用すると、並列プールの作成、ファイルの依存関係の特定、アクセラレータおよびラピッド アクセラレータ シミュレーションのビルド アーティファクトの管理を自動化できます。Parallel Computing Toolbox ライセンスが使用できない場合、関数 parsim ではシミュレーションが逐次実行されます。

関数 batchsim を Parallel Computing Toolbox と MATLAB® Parallel Server™ のライセンスで使用できます。関数 batchsim を使用すると、シミュレーションは計算クラスターにオフロードされます。個別の MATLAB セッションを開いてジョブや結果にアクセスできます。

はじめに、Running Multiple Simulationsおよび家の熱モデルの parsim を使用した並列シミュレーションの実行を参照してください。

関数

batchsim計算クラスターで実行するシミュレーションをオフロード
parsim動的システムを並列または逐次で複数回シミュレーションする
applyToModelSimulationIntput オブジェクトのコンフィギュレーションをモデルに適用する
setBlockParameterSet block parameter values for simulation using SimulationInput or Simulation object
setModelParameterSet model parameter values for simulation using SimulationInput or Simulation object
setInitialStateSpecify initial state for simulation using SimulationInput or Simulation object
setExternalInputSimulationInput オブジェクトまたは Simulation オブジェクトを使用して、最上位の入力端子の外部入力データを指定する
setVariableSimulationInput オブジェクトまたは Simulation オブジェクトを使用してシミュレーション用の変数値を設定する
setVariantConfigurationSet variant configuration for simulation using SimulationInput object (R2024a 以降)
getVariantConfigurationGet name of variant configuration from SimulationInput object (R2024a 以降)
validateValidate contents of SimulationInput object
setPreSimFcnSpecify MATLAB function to run before start of each simulation on Simulink.SimulationInput object
setPostSimFcn 各シミュレーションの完了後に実行する MATLAB 関数を設定
loadVariablesFromMATFileLoad variables from MAT file into Simulink.SimulationInput object
loadVariablesFromExternalSourceLoad variables from a custom file into Simulink.SimulationInput object (R2022b 以降)
getSimulationJobsクラスターからすべての Simulink.Simulation.Job オブジェクトを取得する
showContentsView summary of specification in SimulationInput or Simulation object (R2020a 以降)

クラス

Simulink.SimulationInput複数または個々のシミュレーション用にモデルを変更する Simulink.SimulationInput オブジェクトを作成する
Simulink.Simulation.VariableSimulink.SimulationInput オブジェクト内の変数 (R2020a 以降)
Simulink.Simulation.BlockParameterSimulink.SimulationInput オブジェクトのブロック パラメーター (R2020a 以降)
Simulink.Simulation.Future シミュレーション用の Future オブジェクトを返す
Simulink.Simulation.Job バッチ シミュレーション用の Simulink.Simulation.Job オブジェクト
simulink.multisim.DesignStudyCreate design study for multiple simulations (R2024a 以降)

ツール

複数のシミュレーションRun multiple simulations from the Simulink Editor (R2021b 以降)
シミュレーション マネージャー複数のシミュレーションの監視およびシミュレーション データの可視化

トピック