-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I attempted to provide a recorded action potential (voltage, V) array to a CellML model as an input using an external variable in libCellML. I printed both the input voltage (V) and the model’s response (I). While V matched the values I supplied, it appeared that V had no effect on the model’s output I.
To debug the issue, I created a simple CellML model (attached). The external variable was defined as an array of
[1]*100 + [2]*101 in Python (i.e., 100 elements of 1 followed by 101 elements of 2). For each simulation step, the code read the corresponding element from the array and returned it as the value of the external variable.
I observed that when using the CVODE solver (sksundae.cvode), the model's rate update function was skipped. I then switched to the Euler solver to verify whether the external variable was being correctly read and passed to the model. With Euler, I obtained the expected results.
This suggests that when using an adaptive solver like CVODE, if the external variable changes over time (e.g., a time series), the model may not receive updated values at each timestep because the solver can skip the rate update function. As a result, the external variable does not influence the model output as intended.