simulator.engines¶
The executor of the engine of a model.
execute_plan runs a plan on a loaded model with the executor of its engine:
sbmlsim.simulator.executor for roadrunner,
sbmlsim.simulator.executor_copasi for COPASI and
sbmlsim.simulator.executor_amici for AMICI, which are imported when a model
of their engine runs, so a run of roadrunner never imports COPASI or AMICI.
Every simulation of the package outside the executors runs through it: the
simulator, the workers of a scan and the evaluation of a fit.
execute_plan
¶
Run a plan on a loaded model with the executor of its engine.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plan
|
Plan
|
the plan, compiled against the model. |
required |
model
|
SBMLModel
|
the loaded model, of roadrunner, COPASI or AMICI. |
required |
selections
|
Sequence[str]
|
the columns of the output, the time first. |
required |
Returns:
| Type | Description |
|---|---|
TimecourseResult
|
The output of the simulation. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the engine fails to integrate. |
SteadyStateError
|
if a presimulation finds no steady state. |
NotImplementedError
|
for a feature the engine does not simulate, the
same for every plan of the model, see |
TypeError
|
if the model is not a model of its engine. |
ValueError
|
for an engine without an executor. |
check_plan
¶
Check that the engine of a model simulates a plan, before it runs.
A feature the engine does not simulate is the same for every point of a
plan, so a run checks it once before it runs a point, serially or in a
pool; the executor checks every plan as well. roadrunner simulates every
plan, COPASI refuses a change of a conversion factor and a delayed event
of the model in a plan which sets values between two runs, see
sbmlsim.simulator.executor_copasi.check_supported, and AMICI a change
of a compartment it keeps out of its states, see
sbmlsim.simulator.executor_amici.check_supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plan
|
Plan
|
the plan, compiled against the model, with the values of a point. |
required |
model
|
SBMLModel
|
the loaded model. |
required |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
for a feature the engine does not simulate. |
TypeError
|
if the model is not a model of its engine. |
ValueError
|
for an engine without an executor. |