main content

monitor multiple simulations and visualize the simulation data -凯发k8网页登录

monitor multiple simulations and visualize the simulation data

description

simulation manager allows you to monitor the status of multiple simulations. using this tool, 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 and view diagnostics for each simulation.

  • visualize simulation data to analyze the trends across the simulations.

  • select a simulation run and open the model in simulink®,​ with all of the simulation settings applied to the model.

  • view simulation results in the simulation data inspector.

  • abort simulations.

the simulation manager allows you to monitor multiple simulations, in serial or in parallel, and their progress. you can view the details of every run, such as parameters, elapsed time, and diagnostics. the simulation manager provides the option to analyze and compare your logged signal results in the simulation data inspector. through simulation manager, you can select a run and apply its values to the model.

with the command line api for running multiple simulations, for the parameter to show up in plots in simulation manager use the setvariable method on the simulink.simulationinput object.

open the simulation manager

  • parsim and simfunctions — set the argument showsimulationmanager to on while using simulink.simulationinput object to run simulations. for more information, see .

    out = parsim(in, 'showsimulationmanager', 'on')
    out = sim(in, 'showsimulationmanager', 'on')
  • to open a saved simulation manager session, navigate to the folder where the file is saved and double click the .mldatx simulation manager file.

    open filename.mldatx
  • to open a simulation manager with the simulink.simulationinput object, in, and a simulink.simulationoutput object, out, of a completed run, use the opensimulationmanager command.

    opensimulationmanager(in, out)

examples

open simulation manager

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

mdl = 'sldemo_suspn_3dof';
openexample(mdl);
cf_sweep = cf*(0.05:0.1:0.95);
numsims = length(cf_sweep);

to modify the block parameter road-suspension interaction with the sweep values, create an array of simulink.simulationinput objects.

in(1:numsims) = simulink.simulationinput(mdl);
for i = 1:numsims
 in(i) = setblockparameter(in(i), [mdl '/road-suspension interaction'], 'cf', num2str(cf_sweep(i)));
end

run multiple simulations and open the simulation manager.

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:

plot results

in the figure 1 tab, you can view the default scatter plot where the parameter cf is plotted against itself. use the plot properties to edit the plot. add grid lines for x and y by checking the corresponding boxes. you can also change the data that is displayed on x- and y- axes and the marker color. change the data on y-axis by selecting scopedata(1) from the data drop-down. set the marker color data field to runid.

to add another figure to the simulation manager, click surf or scatter plot and add plots as desired. in this example, click surf plot, located in the results section of the toolstrip. drag the figure 2 tab to view the two plots together.

plots in the simulation manager support numeric arrays and datasets.

adding multiple plots to the simulation manager enables you to observe the simulation data in different ways. using the results, you can analyze and study the design space of the parameters and their behavior.

you can modify the configuration of the plot layouts by clicking the down arrow on the right corner of the plot.

  • tile all — choose a layout for multiple plots.

  • tab position — select where to display the figure tab.

view the status

to view the status of the simulations in list and grid views, click the simulations tab next to figure 1. toggle between the list and grid in the views section of the toolstrip. the list view shows a tabular view of the simulations with certain details, such as status, parameters and timing information. for large number of simulations, choose grid view for a compact view of the status of the simulations.

the status bar at the bottom of the window shows the progress 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.

click a specific run to view more details about it.. the simulation details appear at the bottom of the window.

to show or hide the details of the selected simulation, toggle 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 show results creates a simulation data inspector run from the simulink.simulationoutput object and is displayed in simulation data inspector.

to abort the job while the simulations are running, you can use the stop job button, .

save the session

to save the simulation manager session, click the save button on the toolstrip. the saved session contains all the simulation data and the plot configurations and layout. to reopen the saved simulation manager session, navigate to the folder where the file is saved and double-click the .mldatx simulation manager file.

the reuse window, , button enables you to reuse the plot layout and configurations for new multiple simulations run with a different set of data. if the button is toggled off, a new window opens with each set of simulations. if the button is toggled on, the new simulations reuse the existing window preserving all plot configurations and layouts.

to reopen a saved file, use the open button, navigate to the file location and double click the file.

related examples

see also

functions

topics

    网站地图