Parameter Sweeps
Applies to: CoModel cloud modeling & simulation platform (v1.9+)
1. Overview
Parameter Sweep is one of the core features of CoModel's Parameter Study module. It lets you select one or two parameters in the model and automatically runs a batch of simulations across their value ranges, so you can observe how system outputs vary with the parameters.
Typical applications include:
- Evaluate the effect of spring stiffness on a mechanical system's natural frequency
- Sweep resistance and capacitance values to find circuit parameter combinations that meet response targets
- Compare system stability under different control gains
- Work with Sensitivity Analysis to locate the key parameters that influence the output most
2. Opening the Parameter Study workspace
- In the top navigation bar of the model editor, click the Parameter Study tab.
- The left ~30% of the main view is the job configuration area (with the Config / History sub-tabs); the right ~70% is the results area.
- On first use, the configuration area is empty. Click Scan Model Parameters first: the system compiles the model and extracts the list of available parameters and observables (about 15–60 s the first time, reused afterwards).
- The top of the configuration area has three side-by-side toggle buttons: Single Sweep / Dual Sweep / Sensitivity Analysis. Click Single Sweep or Dual Sweep.

Prerequisite: the model is saved and has completed at least one ordinary simulation successfully (the system relies on the generated runnable model code), and the model contains observables.
3. Configuring a parameter sweep
3.1 Selecting sweep parameters
Select the sweep parameter from the dropdown in the Parameter 1 box; for a dual-parameter sweep, select the second parameter in the Parameter 2 box.
- Parameter names are the model's full MTK names in the form
componentName₊paramName(e.g.capacitor1₊C); each dropdown option shows the parameter's default value. - Single-parameter sweep: for one-dimensional parameter studies; results are shown as 2D curves.
- Dual-parameter sweep: for two-dimensional parameter space exploration; results are shown as heatmaps / contour plots / 3D surface plots.

3.2 Defining the sweep range
For each sweep parameter, choose one of three range types:
| Range type | Settings | Description |
|---|---|---|
| Linear | Start, Stop, Steps | Steps is the number of sample points, taken at equal intervals between start and stop. For example, 1.0 to 10.0 with 10 steps produces 10 points: 1.0, 2.0, …, 10.0. Steps must be 2–10000. |
| Logarithmic | Start, Stop, Steps | Points are spaced on a logarithmic scale between start and stop, for parameters spanning several orders of magnitude. Start and stop must be positive. |
| Custom List | Comma- or space-separated values | Manually specify arbitrary discrete values, e.g. 1.0, 3.0, 7.0, 15.0 (2–10000 values). |
Tip: in a dual-parameter sweep the two parameters can use different range types — for example Linear for the first parameter and Custom List for the second.
3.3 Selecting observables
In the Observables area, check the model's state variables and observables as analysis outputs (at most 10). Blue marks state variables, green marks observables.
3.4 Simulation settings
Parameter Study uses the platform default simulation settings (solver auto, duration 10 s, reltol 1e-3, abstol 1e-6); you can change them in the panel. Changes apply only to this sweep job and do not modify the model's own simulation configuration.
4. Configuration overview
| Configuration | Required | Description |
|---|---|---|
| Analysis type | Yes | Click the Single Sweep or Dual Sweep toggle. |
| Sweep parameters | Yes | 1 for a single-parameter sweep; 2 for a dual-parameter sweep. |
| Sweep range | Yes | Configure a Linear / Logarithmic / Custom List range for each parameter. |
| Observables | Yes | At least 1, at most 10. |
| Simulation settings | No | Starts from platform defaults; can be overridden for this run. |
5. Running the analysis
When configuration is complete, click Run Parameter Study at the bottom left. The CoModel backend starts a dedicated compute process for the analysis and executes each parameter combination as an independent simulation, point by point (at most 2 analyses can run concurrently).
- Progress is shown live below the configuration area on the left:
xx / oosimulations completed. - If a simulation fails, the system captures the error and marks that point; the remaining simulations continue, and the corresponding data point appears as missing in the result chart.
- While running, you can click Cancel Study at any time to terminate the job.

6. Viewing results
A dropdown at the top of the results area switches the observable currently displayed (multiple observables are viewed by switching, not overlaid).
6.1 Single-parameter sweep results
A 2D curve chart is generated: the X axis is the swept parameter, the Y axis is the current observable. Switch the top dropdown to view other observables.
6.2 Dual-parameter sweep results
- A 2D heatmap is shown by default: the X and Y axes are the two swept parameters; color encodes the observable value.
- Toggle buttons above the chart switch between heatmap / contour plot / 3D surface plot.
6.3 Chart interactions
Result charts are rendered with Plotly.js and support the following interactions:
- Scroll-wheel zoom and drag-to-select zoom on a region
- Viewpoint rotation on 3D surface plots
- Hovering a data point to see its value
- Switching between heatmap, contour plot and 3D surface plot
7. Exporting results
Once the analysis completes, use the export buttons at the top right of the results panel to get data and charts:
| Export type | Format | Description |
|---|---|---|
| Raw data | .csv |
Every parameter combination with its observable values, plus a per-run status (run_status) column. |
| Chart image | .png / .svg |
Exports a high-resolution chart of the current view. |
8. Worked example
Using a spring–mass system, evaluate the effect of spring stiffness on the displacement response (single-parameter sweep):
- Open Parameter Study → click Scan Model Parameters → keep Single Sweep selected.
- In Parameter 1, select
spring.k. - Set the range type to Linear, start
100, stop500, steps5(produces 5 points: 100, 200, 300, 400, 500). - Under Observables, check
mass.sandmass.v. - Click Run Parameter Study → a 2D curve appears on the right; switch between
mass.sandmass.vwith the top dropdown.

Dual-parameter sweep: also select a damping parameter in Parameter 2 and configure its range (e.g. Linear 1 to 10 with 10 steps). The system runs 5 × 10 = 50 simulations; results default to a heatmap, switchable to a contour plot or 3D surface.
9. Viewing analysis history
Switch to the History sub-tab on the left to see all Parameter Study jobs for the current model (status, type, completed progress, elapsed time). Click any record to review its result charts; click Exit History View to return to the configuration view.
10. Next steps
- To further quantify how strongly a parameter affects the output, read Sensitivity Analysis.
- For the parameters of an ordinary simulation, see Simulation Settings.