Skip to content

A kind of 'delay_step' setting in synapse could cause an error #287

@Dong-Jiahuan

Description

@Dong-Jiahuan

When creating a brain simulation network, neuron group A and neuron group B form a synapse connection whose delay_step is set to 1 and then neuron group A and neuron group B form a synapse connection whose delay_step is set to None.

self.A2B = bp.synapses.Exponential(self.A, self.B, 
                                      bp.conn.FixedProb(0.02),
                                       output=bp.synouts.COBA(E=0.), g_max=we,
                                       tau=5., 
                                       method=method,
                                       delay_step=1)
self.A2C = bp.synapses.Exponential(self.A, self.C, 
                                      bp.conn.FixedProb(0.02),
                                       output=bp.synouts.COBA(E=0.), g_max=we,
                                       tau=5., 
                                       method=method,
                                       delay_step=None)

During building synapse connection between A and C, __init__ will call method register_delay and the first element of value corresponds to neuron group A's identifier in global_delay_data will be replaced by None. The element replaced by None is an instance of bm.LengthDelay before building synapse connection between A and C.

In this case, when self.A2B updating, it will call method get_delay_data and an error 'NoneType' object is not callable will be given.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions