Description of problem
Hello, I am trying a new plasticity mechanism that depends on the activity of the presynaptic neuron (rho_PF) and postsynaptic neuron (rho_PC). The change in weights depends on a sliding threshold based on the postsynaptic neuron’s activity. However, the equation I’m trying to use to keep my weight changes bounded does not work. I get an error that says Syntax error: Value thresh_M is not constant.
Minimal code to reproduce problem
eqs_Copy = '''
I : amp # copy of the noise current
rho_PF : Hz
rho_PC : Hz
weight : 1 (constant)
new_weight = weight + delta_weight_CS: 1
ddelta_weight_BCM/dt = ((rho_PC*(rho_PC-thresh_M)*e**(-((thresh_M-500*Hz)/(250*(thresh_M-250*Hz)))*rho_PC))/thresh_M)*rho_PF*msecond : 1
phi = (rho_PC*(rho_PC-thresh_M)*e**(-((thresh_M-500*Hz)/(250*(thresh_M-250*Hz)))*rho_PC))/thresh_M : Hz
dthresh_M/dt = rho_PC**2 - thresh_M/tau_thresh_M : Hz
'''
conn_N_PC = NeuronGroup(N_Copy, eqs_Copy, method='euler',dt=dt)
conn_N_PC.weight = Noise_PC_Synapse_Weights
mon_N_PC = StateMonitor(conn_N_PC , ['rho_PF','rho_PC','phi','thresh_M','delta_weight_CS','new_weight','delta_weight_BCM'], record=conn_N_PC_record, dt=dt_rec)
What you have aready tried
I understand the problem comes from the (250-theta) part as theta could reach 250 and make it go to zero. However, I don’t understand what the error truly means.