Skip to content

Commit

Permalink
Fix the aeif_cond_alpha_alt model
Browse files Browse the repository at this point in the history
  • Loading branch information
pnbabu committed Dec 10, 2024
1 parent 7facc1b commit d998fb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions tests/nest_tests/resources/aeif_cond_alpha_alt_neuron.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ model aeif_cond_alpha_alt_neuron:
# Add inlines to simplify the equation definition of V_m
inline exp_arg real = (V_bounded - V_th) / Delta_T
inline I_spike pA = g_L * Delta_T * exp(exp_arg)
# inline I_syn_exc pA = g_exc / nS * pA
# inline I_syn_inh pA = g_inh / nS * pA

V_m' = (-g_L * (V_bounded - E_L) + I_spike - g_exc * (V_bounded - E_exc) - g_inh * (V_bounded - E_exc) - w + I_e + I_stim) / C_m
V_m' = (-g_L * (V_bounded - E_L) + I_spike - g_exc * (V_bounded - E_exc) - g_inh * (V_bounded - E_inh) - w + I_e + I_stim) / C_m
w' = (a * (V_bounded - E_L) - w) / tau_w

refr_t' = -1e3 * ms/s # refractoriness is implemented as an ODE, representing a timer counting back down to zero. XXX: TODO: This should simply read ``refr_t' = -1 / s`` (see https://github.com/nest/nestml/issues/984)
Expand Down
9 changes: 5 additions & 4 deletions tests/nest_tests/test_integrate_odes.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def test_integrate_odes_numeric_higher_order(self):
Tests for higher-order ODEs of the form F(x'',x',x)=0, integrate_odes(x) integrates the full dynamics of x with a numeric solver.
"""
resolution = 0.1
simtime = 100.
simtime = 800.
params_nestml = {"V_peak": 0.0, "a": 4.0, "b": 80.5, "E_L": -70.6,
"g_L": 300.0, 'E_exc': 20.0, 'E_inh': -85.0,
'tau_syn_exc': 40.0, 'tau_syn_inh': 20.0}
Expand All @@ -312,11 +312,12 @@ def test_integrate_odes_numeric_higher_order(self):
nest.SetStatus(n, params_nest)

spike = nest.Create("spike_generator")
spike_times = [10.0, 50.0]
spike_times = [10.0, 400.0]
nest.SetStatus(spike, {"spike_times": spike_times})
nest.Connect(spike, n, syn_spec={"weight": 1., "delay": 1.0})
nest.Connect(spike, n, syn_spec={"weight": 0.1, "delay": 1.0})
nest.Connect(spike, n, syn_spec={"weight": -0.2, "delay": 100.})

mm = nest.Create("multimeter", params={"interval": resolution, "record_from": ["V_m"]})
mm = nest.Create("multimeter", params={"record_from": ["V_m"]})
nest.Connect(mm, n)

nest.Simulate(simtime)
Expand Down

0 comments on commit d998fb7

Please sign in to comment.