Run a Simulation
Configure and execute simulations with custom parameters.
Time estimate: 15 minutes
Goal
By the end of this tutorial, you’ll be able to:
- Configure simulation time settings
- Modify initial conditions and parameters
- Monitor simulation progress
- Handle common simulation issues
Starting a Run
From any model detail page:
- Click Run Simulation button
- The run configuration panel opens
- Configure settings (see below)
- Click Start Run
Configuration Options
Time Settings
| Setting | Description | Example |
|---|---|---|
| Duration | Total simulation time | 100 seconds |
| Output Points | Number of data points returned | 500 |
| Start Time | When to begin recording | 0 |
More output points = smoother plots but larger data files. 500-1000 is usually sufficient.
Initial Conditions
Override the default starting values for any species:
# Example
prey: 100 → 150
predator: 10 → 20Click on any species to modify its initial value.
Parameter Overrides
Modify model parameters without editing the model:
# Example
alpha: 1.0 → 1.5
beta: 0.1 → 0.08Invalid parameter values may cause simulation failures. Check parameter bounds in model documentation.
Monitoring Progress
After starting a run:
-
Status indicator shows current state:
- 🟡 Queued
- 🔵 Running
- 🟢 Completed
- 🔴 Failed
-
Progress bar shows completion percentage
-
Estimated time remaining (for longer simulations)
Run States
| State | Description | Action |
|---|---|---|
| Queued | Waiting in job queue | Wait |
| Running | Simulation executing | Wait |
| Completed | Results available | View Results |
| Failed | Error occurred | Check error message |
| Cancelled | User cancelled | Start new run |
Handling Failures
Common Error: Numerical Instability
Symptoms: “Integration failed” or “NaN values”
Solutions:
- Reduce simulation duration
- Decrease output points
- Check for extreme parameter values
- Use a different integration method (if available)
Common Error: Timeout
Symptoms: “Simulation timed out”
Solutions:
- Reduce duration or complexity
- Break into smaller runs
- Contact support for long-running simulations
Common Error: Invalid Parameters
Symptoms: “Parameter out of bounds”
Solutions:
- Check parameter constraints in model documentation
- Reset to default values
- Use biologically reasonable values
Batch Runs
Run multiple simulations with different parameters:
- From model page, click Parameter Sweep
- Select parameter to vary
- Define range: min, max, steps
- Start batch
Results are collected and can be compared in the results viewer.
Best Practices
- Start simple: Run with defaults first, then modify
- Document changes: Note which parameters you changed
- Save configurations: Bookmark configurations you use frequently
- Compare systematically: Change one parameter at a time
Programmatic Runs
For automation, use the B-Simulant Library:
from bsim.adapters import TelluriumAdapter
# Load model and run simulation
adapter = TelluriumAdapter(model_path="model.sbml", parameters={"alpha": 1.5, "beta": 0.1})
adapter.setup({})
# Advance simulation
for t in range(0, 100, 1):
adapter.advance_to(t)
outputs = adapter.get_outputs()
print(f"Time {t}: {outputs}")The configuration varies by model standard:
- SBML: Use
TelluriumAdapterwithadvance_to(...)andget_outputs() - NeuroML: Use
NeuroMLAdapterwithadvance_to(...)(ms) - ONNX: Use
MLAdapterwithset_inputs(...),advance_to(...), andget_outputs()
See B-Simulant Library for full documentation.
Next Steps
- Analyze Results - Visualize your simulation
- B-Simulant Library - Automate simulations with Python