The SimulationExperimentView plugin can be used to run CellML and SED-ML files, as well as COMBINE archives. However, note that only the SED-ML files and COMBINE archives generated by OpenCOR are guaranteed to work.

A CellML file describes either a system of ordinary differential equations (ODEs) or differential algebraic equations (DAEs).

Open a CellML file

Upon opening a CellML file, OpenCOR checks that it can be used for simulation. If it cannot, then a message describing the issue is shown:

On the other hand, if you open a valid CellML file (e.g. models/noble_model_1962.cellml, which is shipped with OpenCOR), then the view will look something like:

It consists of two main parts, the first of which allows you to customise the simulation, the solver(s) and the model parameters, as well as to specify which graphs to plot. The second part is used to plot the requested graphs. In the Parameters section, all the model parameters have an icon associated with them to highlight their type:

Variable of integration
(Editable) constant
Computed constant
(Editable) state
Run an ODE model

To run a model, you need to provide some information about the simulation itself, i.e. its starting point, ending point and point interval. Then, you need to specify the solver(s) that you want to use. The solvers available to you depend on which solver plugins you selected, as well as on the type of your model (i.e. ODE or DAE). If you are dealing with an ODE model and all the solver plugins are selected, then CVODE, forward Euler, Heun, and second-order and fourth-order Runge-Kutta will be available to you:

Each solver comes with its own set of properties, which can be customised. For example, if you select Euler (forward), you will see that it has only one property (Step):

You can start the simulation by pressing F9 or by clicking on the button. Then, or before, you can add a graph. All the model parameters are listed to the bottom-left of the view, grouped by components in which they were originally defined. To add a graph, right click on a model parameter and select against which other model parameter you want it to be plotted. For example, to create a graph for V (from the membrane component) against the variable of integration (i.e. time since the simulation properties are expressed in milliseconds):

You can get the information associated with a graph by double clicking on it:

The Model property is used to associate the graph with a particular file. By default, it has a value of Current, which means that the graph is associated with the current file. You can, however, explicitly associate it with another one. The icon will be shown next to the check box, if the association cannot be done, and next to the X and/or Y properties to highlight which model parameter(s) could not be found in the other file. The icon indicates that the graph is not locked, i.e. its Model property has a value of Current, while the icon is used when a graph is associated with a specific file (resulting in a red trace rather than a blue one). The X and Y properties can be modified either by editing their value or by right clicking on them and selecting another model parameter from the context menu, which can also be used to add or remove a graph.

Back to the simulation, you can see that it failed with several model parameters having a value of nan (i.e. not a number). This is because the solver was not properly set up: its Step property is too big. If you set it to 0.01 milliseconds, reset all the model parameters (by clicking on the button), clear the simulation data (by clicking on the button) and restart the simulation, then you will get something like:

Roughly the same trace can be obtained using the CVODE solver:

However, the simulation is so quick to run that you will not have time to see its progress. Between the and buttons, there is a wheel that you can use to add a short delay between two data points. Thus, by using a value of 100,000 (or a bigger/smaller value, depending on the speed of your computer), you can run the simulation and pause it at a point of interest:

Now, you can modify any of the model parameters identified by either the or icon (i.e. a state or a constant). Say that you want to set g_Na_max (from the sodium_channel component) to 0 milliS_per_cm2. To resume the simulation will then give you something like:

If you want, you can export some or all of the simulation data to a BioSignalML or a comma-separated values (CSV) file. To do so, click on the button. In the case of BioSignalML, you will be asked to provide some (optional) information, as well as specify which model parameters you want to export:

In the case of CSV, you will only need to specify the model parameters you want to export:

If you want to create other graphs, but do not want them on the same graph panel as the existing one, you can click on the button to create a new graph panel:

You might have noticed that the bottom graph panel has a blue vertical line to its left. This is to indicate that it is the currently selected graph panel (a graph panel can be selected by clicking on it). Something else that you might have noticed is that the Graphs section is now empty. This is because there are currently no graphs associated with the graph panel. Just for illustration, you can create a graph to plot V (from the membrane component) against V' (also from the membrane component):

You can create as many graph panels (and graphs) as you want. The current graph panel or all the graph panels (but the first one) can be removed by clicking on the button.

Simulate a DAE model

To simulate a DAE model is similar to simulating an ODE model, except that OpenCOR will also need to solve one or several systems of non-linear algebraic (NLA) equations:

Simulate a CellML 1.1 model

So far, we have only simulated CellML 1.0 models, but you can also simulate CellML 1.1 models, i.e. models that import units and/or components from other models:

Simulate several models at the same time

Each simulation is run in its own thread, which means that several simulations can be run at the same time. Simulations running in the background display a small progress bar in the top tab bar while the foreground simulation uses the main progress bar at the bottom of the view:

SED-ML support

An important aspect of modelling is reproducibility. To that end, a simulation can be exported to SED-ML by clicking on the button. The export can then be done either to a SED-ML file or a COMBINE archive, both of which can then be re-run by OpenCOR and any SED-ML capable software (e.g. SED-ML Web Tools).

A SED-ML file (or a COMBINE archive) contains all the information needed to reproduce a simulation, i.e. a reference to the model (or even the model itself in the case of a COMBINE archive; the referenced model can be opened by clicking on the button), the parameters of the simulation, the solver and its properties, the number of graph panels, and the graphs to be plotted in each graph panel. Thus, once open, a simulation can be re-run by pressing F9 or by clicking on the button:

Please note that changes to model parameters (either before or in the middle of a simulation) are not currently supported, and will therefore be ignored, if present.

Plotting area

The plotting area offers several features that can be activated by:

Tool bar
Run the simulation
Pause the simulation
Stop the simulation
Reset all the model parameters
Clear the simulation data
Enable/disable the development mode
Add a graph panel
Remove the current graph panel or all the graph panels
Open the referenced CellML file
Export the simulation to SED-ML
Export the simulation data