Canonical RHS excerpt from the registered callable used for this benchmark cell. Expand it to verify the state equations; it is not a standalone runnable fixture.
Show canonical RHS excerpt
def _light(t, i):
"""Photic drive: half-sinusoid with 24h period, only for VL neurons."""
if i >= _N_VL:
return 0.0
phase = np.sin(2.0 * np.pi * t / 24.0)
return _L0 * max(phase, 0.0)
def goodwin_scn_20_rhs(t, y):
Y = y.reshape(_N_OSC, 3)
X = Y[:, 0]
F = np.mean(X) # mean-field coupling
K1n = _K1 ** _HILL_N
dy = np.empty(3 * _N_OSC)
for i in range(_N_OSC):
xi, yi, zi = Y[i, 0], Y[i, 1], Y[i, 2]
zi_safe = max(zi, 0.0)
xi_safe = max(xi, 0.0)
yi_safe = max(yi, 0.0)
# dX/dt
repression = K1n / (K1n + zi_safe ** _HILL_N)
deg_x = _V2 * xi_safe / (_K2 + xi_safe)
dx = _V1[i] * repression + _light(t, i) - deg_x + _G_COUPLING * (F - xi_safe)
# dY/dt
deg_y = _V4 * yi_safe / (_K4 + yi_safe)
dyi = _K3 * xi_safe - deg_y
# dZ/dt
deg_z = _V6 * zi_safe / (_K6 + zi_safe)
dzi = _K5 * yi_safe - deg_z
base = 3 * i
dy[base] = dx
dy[base + 1] = dyi
dy[base + 2] = dzi
return dy- Parameters
- _G_COUPLING = 0.1
- _HILL_N = 4
- _K1 = 1
- _K2 = 1
- _K3 = 0.7
- _K4 = 1
- _K5 = 0.7
- _K6 = 1
- _L0 = 0.1
- _N_OSC = 20
- _N_VL = 4
- _V1 = [0.717384995355, 0.709008997387, 0.673728484896, 0.70092311705, 0.720470654395, 0.670319668348, …] [shape=(20,), min=0.635172623939, max=0.720470654395]
- _V2 = 0.35
- _V4 = 0.35
- _V6 = 0.35
- Initial condition
- y(0) = [0.278287387934, 0.219946908932, 0.205659569961, 0.269874105722, 0.188427994961, 0.233028730742, …] [shape=(60,), min=0.144028217891, max=0.33509772364]
- Horizon
- t ∈ [0, 720]
Canonical RHS excerpt captured from the same registered callable used for the published benchmark. Frozen closure values are summarized below; helper imports and solver settings are intentionally omitted.