This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Simulation Manager

Monitor multiple simulations in one window

Description

Simulation Manager allows you to monitor the status of multiple simulations. Using this app, you can:

  • View the progress of the simulations in a high-level grid view or a detailed list view.

  • Find the simulations that error out.

  • Abort simulations.

  • Select a simulation run and open the model in Simulink,​ with all of the simulation's settings applied to the model.

  • View simulation results in the Simulation Data Inspector.

Open the Simulation Manager App

  • sim command – You can use sim with SimulationInput object to open the UI. Set the argument ShowSimulationManager to on.

    out = sim(in, 'ShowSimulationManager', 'on')

  • parsim command – Set the argument ShowSimulationManager to on with Parallel Computing Toolbox. parsim command uses a SimulationInput object to run simulations. For more information, see Simulink.SimulationInput.

    out = parsim(in, 'ShowSimulationManager', 'on')

  • To reopen the Simulation Manager, use the command openSimulationManager('modelName'). This command lets you reopen the last running session.

    Note

    You can use this command to reopen the Simulation Manager, if you close the window unintentionally.

Examples

Open Simulation Manager

Open the model sldemo_suspn_3dof and create a set of sweep values.

mdl = 'sldemo_suspn_3dof';
open_system(mdl);
Cf_sweep = Cf*(0.05:0.1:0.95);
numSims = length(Cf_sweep);

Create an array of Simulink.SimulationInput objects to modify the block parameter Road-Suspension Interaction with the sweep values.

for i = numSims:-1:1
 in(i) = Simulink.SimulationInput(mdl);
 in(i) = setBlockParameter(in(i), [mdl '/Road-Suspension Interaction'], 'Cf', num2str(Cf_sweep(i)));
end

Run multiple simulations and open the Simulation Manager to monitor them.

out = parsim(in, 'ShowSimulationManager', 'on')

In the absence of Parallel Computing Toolbox, the simulations run in serial.

Using Simulation Manager

Once you run the parsim command, the Simulation Manager UI opens up as follows:

The progress bar on top right is color coded based on the status of the simulations.

You can view all the multiple simulations in a detailed list view. This view gives you an option to add or delete columns. Use the button, , to choose which columns to display. You can also sort the columns based on your preference.

You can view more information about a particular run by clicking on it. When you click on a run, simulation details appear at the bottom of the window.

To hide the details of the selected run, click the Simulation Details button, .

Open Selected button, , allows you to open the model with the specifications of the selected run.

You can view the results of one or more runs in the Simulation Data Inspector by clicking the Show Results button, . Clicking on Show Results creates a Simulation Data Inspector run from the Simulink.SimulationOutput object and is displayed in Simulation Data Inspector. You can also return your results in the Simulink.SimulationOutput object.

To stop the job at the beginning of your simulations, you can use the Stop Job button, .

Related Examples