複数のシミュレーションの実行
parsim
、関数 batchsim
、または Simulink® の [複数のシミュレーション] パネルを使ってこれらの入力で複数のシミュレーションを実行する複数の並列シミュレーションおよび大規模データのログ記録が含まれるワークフローについて、parsim
コマンドまたは batchsim
コマンドのコマンド ライン API を使用するか、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 を使用した並列シミュレーションの実行を参照してください。
関数
applyToModel | SimulationInput オブジェクト in を使用して指定されたモデルに変更を適用 |
setBlockParameter | SimulationInput オブジェクト in を使用して特定のシミュレーションに使用されるブロック パラメーターを設定 |
setModelParameter | SimulationInput オブジェクト in によって、特定のシミュレーションに使用するモデル パラメーターを設定 |
setInitialState | Configure Simulink.SimulationInput object to
set initial state for simulation |
setExternalInput | SimulationInput オブジェクト in を使用してシミュレーションに外部入力を設定 |
setVariable | SimulationInput オブジェクト in を使用してシミュレーションの変数を設定 |
validate | SimulationInput オブジェクト in の内容を検証 |
setPreSimFcn | SimulationInput オブジェクト in を使用して各シミュレーションの開始前に MATLAB 関数が実行されるように指定します。 |
setPostSimFcn | SimulationInput オブジェクト in を使って、シミュレーションが完了するたびに実行される MATLAB 関数を指定する |
loadVariablesFromMATFile | MAT ファイルから Simulink.SimulationInput オブジェクト in に変数を読み込む |
getSimulationJobs | クラスターからすべての Simulink.Simulation.Job オブジェクトを取得する |
contents | Simulink.SimulationInput オブジェクトの内容を表示 |
クラス
Simulink.SimulationInput | 複数または個々のシミュレーション用にモデルを変更する SimulationInput オブジェクトを作成 |
Simulink.Simulation.Variable | Simulink.SimulationInput オブジェクト内の変数 |
Simulink.Simulation.BlockParameter | Simulink.SimulationInput オブジェクトのブロック パラメーター |
Simulink.Simulation.Future | シミュレーション用の Future オブジェクトを返す |
Simulink.Simulation.Job | batchsim を実行して、Simulink.Simulation.Job オブジェクト、simJob を作成します。 |
ツール
複数のシミュレーション | Run multiple simulations from the Simulink Editor |
シミュレーション マネージャー | 複数のシミュレーションの監視およびシミュレーション データの可視化 |
トピック
- Running Multiple Simulations
Run multiple simulations from the
parsim
andbatchsim
commands, and the Multiple Simulations panel in Simulink Editor. - 家の熱モデルの parsim を使用した並列シミュレーションの実行
Simulink.SimulationInput
オブジェクトを使用して複数の並列シミュレーションのコマンド ライン ワークフローを実行する。 - 並列シミュレーションの実行
モデルの並列シミュレーションをプログラムで実行します。
- Configure and Run Simulations with Multiple Simulations Panel
Learn about the Multiple Simulations panel in the Simulink Editor.
- 複数のシミュレーション ワークフローの比較
parsim
、RunInBackground
をもつparsim
、およびbatchsim
の類似と相違を理解する。 - シミュレーション マネージャーを使用した結果の解析
シミュレーション マネージャーを使用したシミュレーションデータの可視化、シミュレーションの結果および傾向の解析。