Protocols
ProtocolRunner is the standalone, user-facing class for running a model
through a multi-experiment / sub-experiment protocol with given parameter
values — useful for re-simulating with calibrated parameters outside the
param-id loop.
protocol_runners.protocol_runner.ProtocolRunner
ProtocolRunner(
model_path,
inp_data_dict=None,
solver="CVODE_myokit",
model_type=None,
)
Standalone, user-facing runner for model protocols.
Creates its own SimulationHelper
(defaulting to Myokit / CVODE) and wraps ProtocolExecutor for the
multi-experiment / sub-experiment simulation loop. Useful for re-simulating
a model with calibrated parameters outside the param-id loop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_path
|
Path to the model file. |
required | |
inp_data_dict
|
Configuration dict containing at least |
None
|
|
solver
|
Solver identifier passed to
|
'CVODE_myokit'
|
|
model_type
|
Backend family ( |
None
|
get_variable_names
get_variable_names()
Return the variable names of the model (used for downstream plotting).
get_var2idx_dict
get_var2idx_dict()
Return a mapping from variable name to index in the result list.
run_protocols
run_protocols(
model_path,
protocol_info=None,
id_param_names=None,
id_param_vals=None,
)
Run the protocol defined by protocol_info and return result arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_path
|
Path to the model. Kept for API compatibility; the model was loaded at construction time and this argument is not re-used. |
required | |
protocol_info
|
Protocol descriptor. If None, read from
|
None
|
|
id_param_names
|
Parameter names to set (same format as param_id). |
None
|
|
id_param_vals
|
Values to apply before each experiment (e.g. calibrated parameters). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
|
|
|
vector per experiment (pre_time removed); |
||
|
the full time-series for that variable concatenated across |
||
|
sub-experiments; and |
||
|
|