New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking variables between NeuronGroups of size 1 not handled correctly #383

mstimberg opened this Issue Dec 18, 2014 · 1 comment


None yet
1 participant

mstimberg commented Dec 18, 2014

When linking a variable from a size 1 NeuronGroup, we treat the variable as a shared variable. We should not do this if the target group also has size 1. Also, variables linked as a shared variable should have the usual restrictions of shared variables, e.g. it is not allowed to update them in a reset statement.

The following code (provided by Gordon Erlebacher) does not work correctly, it updates G.vx at every time step:

G1 = NeuronGroup(2, ''' dvx/dt = 0*Hz : 1 ''')
G3 = NeuronGroup(2, ''' dv/dt = 1*Hz : 1
                        v1 : 1 (linked)''',
                        threshold='v > 3', reset='v1 -= 1.0; v = 0')  # v1 decreasing every step. WHY?
G3.v1 = linked_var(G1.vx)

@mstimberg mstimberg self-assigned this Dec 18, 2014

@mstimberg mstimberg added this to the 2.0beta2 milestone Dec 18, 2014


This comment has been minimized.

Show comment
Hide comment

mstimberg Jan 20, 2015


Closed via #385


mstimberg commented Jan 20, 2015

Closed via #385

@mstimberg mstimberg closed this Jan 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment