Parallel Simulations with MATLAB and Simulink
Execute massive simulations in parallel and scale them from desktop to clusters and cloud.
Use parallel computing to execute multiple simulations simultaneously by leveraging multicore processors or compute clusters. This capability enables you to:
- Set-up, run, and manage multiple simulations in parallel within few steps
- Speed up your workflows
- Off-load execution of long-running computations to the background or remote hardware
- Scale your simulations to clusters and cloud
![Reduce simulation time by using parallel simulation capability in Simulink](https://in.mathworks.com/solutions/parallel-simulation/_jcr_content/mainParsys/band_copy_1227855798/mainParsys/columns_copy_2070482/2/image.adapt.full.medium.png/1724080422991.png)
Using MATLAB and Simulink for Parallel Simulations
Set-up and Run Parallel Simulations
Use the multiple simulation panel to specify parameter values and run simulations in parallel by clicking on "run-all." This eliminates the need for scripting and enables immediate setup of parallel simulations. For better customization, you can create a simulation input object and employ the parsim command. parsim command automatically generates a parallel pool of workers if one is not already open.
By using the multiple simulation panel or the parsim command, Simulink distributes simulations across available CPU resources, resulting in faster overall simulation time. Also, after simulations begin, you can monitor progress and view results using the simulation manager.
Explore Products
![Use the batchsim function to offload simulation to local or remote resources](https://in.mathworks.com/solutions/parallel-simulation/_jcr_content/mainParsys/band_copy_copy_10388_841997386/mainParsys/column_0_copy_copy/1/image_1551718569.adapt.full.medium.png/1724080423390.png)
Offload Simulations on Remote Resources
Using the batchsim
command is a convenient method for distributing simulations to a compute cluster. With batchsim
, you can offload simulations to run in the background on either your local resources or remote hardware where MATLAB Parallel Server is installed. This allows you to continue working on other tasks while the batch job executes.
Leverage Built-in Parallel Simulink Functionality
In addition to using multiple simulations panel, parsim, and batchsim
functions to run Simulink simulations, there are several Simulink products which come equipped with built-in parallel capability, including the Reinforcement Learning Toolbox, Simulink Design Optimization, Simulink Test, and Simulink Coverage. With these tools, you can run simulations in parallel seamlessly, without the need for writing additional code.
![Parallel simulations can be enabled for Simulink products by a preference or flag setting.](https://in.mathworks.com/solutions/parallel-simulation/_jcr_content/mainParsys/band_copy_copy_10388_2127226767/mainParsys/column_0_copy_copy/2/image_1551718569.adapt.full.medium.jpg/1724080423599.jpg)
Manage Multiple Simulations with Simulink Simulation Manager
Monitor, inspect, and visualize multiple simulations simultaneously in a single window with Simulation Manager. The Simulation manager is fully integrated with the parallel simulation functions, which allows for easy selection and viewing of individual simulations. Additionally, you can visualize simulation data dynamically to analyze the trends across the simulations, and you can run diagnostic tasks and abort simulations directly from the Simulation manager interface.
Simulink Data Inspector integrates with Simulation Manager, allowing examination of simulation results in Simulation Data Inspector.
Execute Massive Parallel Simulation on Clusters and in the Cloud
Prototype, debug, and run simulations in parallel on the local machine with Parallel Computing Toolbox. You can easily scale them to clusters with MATLAB Parallel Server and to the cloud with minimum code change. Scale your Simulink simulations in public cloud platforms such as Amazon® Web Services (AWS) or Microsoft Azure to develop using high-end cloud compute resources like multi-CPUs, multi-GPUs, or clusters. With MathWorks Cloud Center, you can create, manage, and access public cloud resources for MATLAB/Simulink and MATLAB Parallel Server using your AWS credentials.
By running simulations on a cluster or in the cloud, you can obtain insights more quickly and access different execution environments from your desktop just by changing your cluster profile.
![Execute on cluster or cloud resources without recoding](https://in.mathworks.com/solutions/parallel-simulation/_jcr_content/mainParsys/band_copy_copy_10388_718348253/mainParsys/column_0_copy_copy/2/image_1551718569.adapt.full.medium.png/1724080423997.png)
30-Day Free Trial
Get started