testsuite.simulators¶
Simulator functions run inside a SimulatorWorker.
Every function imports its simulator lazily, so a worker process loads only
the simulator it is used for: roadrunner and libopencor bundle different LLVM
versions and crash once both have compiled in the same process. Results are
plain dictionaries (columns, rows) so they can be sent between processes.
simulate_sbml
¶
simulate_sbml(
sbml,
selections,
start,
end,
steps,
relative_tolerance=None,
absolute_tolerance=None,
maximum_number_of_steps=None,
)
Uniform timecourse of an SBML model with roadrunner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sbml
|
str
|
SBML document as string. |
required |
selections
|
list[str]
|
roadrunner selections after |
required |
start
|
float
|
start time. |
required |
end
|
float
|
end time. |
required |
steps
|
int
|
number of intervals, the result has |
required |
relative_tolerance
|
float | None
|
relative tolerance of the integrator, the
roadrunner default when |
None
|
absolute_tolerance
|
float | None
|
absolute tolerance of the integrator, the
roadrunner default when |
None
|
maximum_number_of_steps
|
int | None
|
internal steps of the integrator between
two time points, the roadrunner default (20000) when |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
|
simulate_cellml
¶
simulate_cellml(
cellml_path,
start,
end,
steps,
relative_tolerance=None,
absolute_tolerance=None,
maximum_number_of_steps=None,
)
Uniform timecourse of a CellML model with libopencor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cellml_path
|
str
|
path of the CellML file. |
required |
start
|
float
|
start time. |
required |
end
|
float
|
end time. |
required |
steps
|
int
|
number of intervals. |
required |
relative_tolerance
|
float | None
|
relative tolerance of the ODE solver, the
libopencor default when |
None
|
absolute_tolerance
|
float | None
|
absolute tolerance of the ODE solver, the
libopencor default when |
None
|
maximum_number_of_steps
|
int | None
|
internal steps of the ODE solver between
two time points, the default of |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
|
sleep
¶
Sleep, for the timeout tests of the worker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seconds
|
float
|
how long. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
|