g_L = 2*mS g_Ca = 4.4*mS g_K = 8*mS V_L = -60*mV V_Ca = 120*mV V_K = -84*mV lambda_n__max = 1.0/(15*ms) V_1 = -1.2*mV V_2 = 18*mV V_3 = 2*mV V_4 = 30*mV C = 20*uF C_calc = 0*uF C_min = 20*uF I_min = 70*uA alpha = 0.81*uF/uA eqs = ''' C_calc = C_min + (alpha*(I - I_min)**2)/I_min : farad C = C_calc*int(C_calc>C_min) + C_min*int(C_min>C_calc) : farad dv/dt = (-g_L*(v - V_L) - g_Ca*m_inf*(v - V_Ca) - g_K*n*(v - V_K) + I)/C : volt dn/dt = lambda_n*(n_inf - n) : 1 m_inf = 0.5*(1 + tanh((v - V_1)/V_2)) : 1 n_inf = 0.5*(1 + tanh((v - V_3)/V_4)) : 1 lambda_n = lambda_n__max*cosh((v - V_3)/(2*V_4)) : 1 I : amp inhibit : boolean v_th : 1'''
KeyError: 'The identifier "V_4" could not be resolved.'
Error encountered with object named "neurongroup_4".Object was created here (most recent call only, full details in debug log): File "NewNetworkLoader.py", line 101, in init_network refractory = T_INHIBIT)
An error occurred when preparing an object. KeyError: 'The identifier "V_4" could not be resolved.'(See above for original error message and traceback.)
Hi,
the external constants have to be available at the point where you call the "run" function, not where you define the equation. I'm guessing that this is not the case in your script. If your code structure does not support defining the constants like this, you have two alternatives:
Hope that helps, best
Marcel