メインコンテンツ

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

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

モデルへの一連の入力を指定し、関数 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 を使用した並列シミュレーションの実行を参照してください。

オブジェクト

すべて展開する

simulink.multisim.DesignStudyCreate design study for multiple simulations (R2024a 以降)
simulink.multisim.ExternalInputSpecify a range of external inputs (R2024a 以降)
simulink.multisim.VariableSpecify a range of values for model variables (R2024a 以降)
simulink.multisim.ModelParameterSpecify a range of values for model parameters (R2024a 以降)
simulink.multisim.BlockParameterSpecify a range of block parameters (R2024a 以降)
Simulink.SimulationInput複数または個々のシミュレーション用にモデルを変更する Simulink.SimulationInput オブジェクトを作成する
Simulink.Simulation.VariableSimulink.SimulationInput オブジェクト内の変数
Simulink.Simulation.BlockParameterSimulink.SimulationInput オブジェクトのブロック パラメーター
Simulink.Simulation.Future シミュレーション用の Future オブジェクトを返す
Simulink.Simulation.Job バッチ シミュレーション用の Simulink.Simulation.Job オブジェクト
simulink.multisim.MultisimDatastoreCreate datastore for post-processing large-scale simulation results (R2025a 以降)

関数

すべて展開する

batchsim計算クラスターで実行するシミュレーションをオフロード
parsim動的システムを並列または逐次で複数回シミュレーションする
applyToModelSimulationInput オブジェクトのコンフィギュレーションをモデルに適用
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
setPreSimFcnSimulink.SimulationInput オブジェクトで各シミュレーションを開始する前に実行する MATLAB 関数を指定する
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

ツール

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

トピック

注目の例