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

Bad equations generation 2.1.0 regression #896

Closed
zifeo opened this Issue Nov 6, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@zifeo
Contributor

zifeo commented Nov 6, 2017

The following worked before the 2.1.0 release. No workaround found yet except reverting to 2.0.2.

from brian2 import *
eqs = Equations(
    '''
    I = v * s : amp
    ds / dt = - s : 1
    ''',
    I='I1',
    s='s1',
)
eqs += Equations(
    '''
    I = v * s : amp
    ds / dt = - s : 1
    ''',
    I='I2',
    s='s2',
)
print(eqs)

In Brian2==2.0.2.1, it correctly outputs:

I2 = v * s2  : amp
I1 = v * s1  : amp
ds1/dt = - s1  : 1
ds2/dt = - s2  : 1

In Brian2==2.1.1, it sadly outputs (notice the s1 replacing s2):

I2 = v * s1  : amp
I1 = v * s1  : amp
ds1/dt = - s1  : 1
ds2/dt = - s1  : 1

@zifeo zifeo changed the title from Bad equations generation 2.1.1 regression to Bad equations generation 2.1.0 regression Nov 6, 2017

@mstimberg mstimberg self-assigned this Nov 7, 2017

@mstimberg

This comment has been minimized.

Show comment
Hide comment
@mstimberg

mstimberg Nov 7, 2017

Member

Many thanks for the report. I'll look into this as soon as possible.

Member

mstimberg commented Nov 7, 2017

Many thanks for the report. I'll look into this as soon as possible.

@mstimberg

This comment has been minimized.

Show comment
Hide comment
@mstimberg

mstimberg Nov 7, 2017

Member

@zifeo, I just pushed an equations_bug_#896 branch that should fix the issue, could you try it out with your "real life" use case?

Member

mstimberg commented Nov 7, 2017

@zifeo, I just pushed an equations_bug_#896 branch that should fix the issue, could you try it out with your "real life" use case?

@zifeo

This comment has been minimized.

Show comment
Hide comment
@zifeo

zifeo Nov 7, 2017

Contributor

@mstimberg Just verified, the fix works fine. Thanks for the reactiveness!

Contributor

zifeo commented Nov 7, 2017

@mstimberg Just verified, the fix works fine. Thanks for the reactiveness!

@mstimberg mstimberg closed this in 642104e Nov 7, 2017

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