Skills

Simulink Run Parallel Simulations

Use this skill to run multiple Simulink simulations in parallel with parsim, batchsim...

Install

npx skills add matlab/simulink-agentic-toolkit --skill simulink-run-parallel-simulations -g -a claude-code -y
Category
Design
Updated
6d ago
License
See repository
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Use this skill to run multiple Simulink simulations in parallel with parsim, batchsim, and DesignStudy. TRIGGER when: user asks for parameter sweep, sweeping/varying parameters across simulations, Monte Carlo study, batch simulation, running multiple simulations, parallel simulations, large-scale multiple simulations, any task involving repeated simulations with different parameter values, user mentions having an existing script/function for parameter sweeps, or user wants to migrate from parfor/set_param/for-loop patterns to recommended workflows.

Running Multiple Simulations in Parallel

Set up and run parallel simulations with parsim, batchsim, or simulink.multisim.DesignStudy.

When to Use

  • Parameter sweeps, Monte Carlo studies, batch simulations (local or cluster)
  • parsim (local parallel), batchsim (cluster offload), DesignStudy (large-scale combinations)
  • preSimFcn/postSimFcn callbacks for setup or post-processing
  • Live visualization as simulations complete (ValueStore pattern)

When NOT to Use

  • Single simulation → simulating-simulink-models
  • Pass/fail tests → testing-simulink-models
  • Model editing → building-simulink-models

Prerequisites

If model inspection cannot resolve them, ask the user to provide: the exact model filename, the parameter name and type (workspace variable, block parameter, or model parameter), and the logged signal name(s) to use for metrics. Do not guess any of these values.

Key Functions

FunctionPurposeToolboxAvailable From
Simulink.SimulationInputSpecify per-run parameter overrides and callbacksSimulinkR2017a
parsimRun a SimulationInput array / DesignStudy on a parallel poolSimulinkR2017a
batchsimOffload a campaign to a cluster as a background jobSimulinkR2018b
simulink.multisim.DesignStudyGenerate multi-parameter combinations (with .Variable / .ModelParameter / .BlockParameter / .ExternalInput / .Exhaustive / .Sequential)SimulinkR2024a
parpoolCreate a parallel pool sized to the campaignParallel Computing ToolboxR2013b
parclusterQuery the cluster profile and worker capacityParallel Computing ToolboxR2012a

Match suggestions to the running release. The "Available From" column is authoritative: before recommending a function, confirm it exists in the release in use (version('-release')) and never propose one introduced later.

Workflow

Read the whole SKILL.md on GitHub

More in Design