Hi folks, I am experimenting with implementing the non-Markovian Gillespie Algorithm (nMGA) in Brian based on Vestergaard and Genois (PLoS Comput. Biol. 2015, p9). Is there a way to retrieve real-time evaluations of the threshold/reset conditions?
At the moment my method is implemented by reaction=NeuronGroup(1,code=nMGA,...)
where
nMGA = '''
tau : 1
Q : 1
transition = tau<Q*dt : boolean
...
...
'''
Say I have a reaction in the nMGA scheme every time tau<Q*dt
where tau
and Q
are set inside my nMGA implementation (within reaction=NeuronGroup(...)
. This reaction is detected passing threshold='tau<Q*dt
to the NeuronGroup
.
Because the nMGA requires some tricks for multiple transitions within the same time step, I am using reaction.run_regularly(code=code_after_transition)
as well, where
code_after_transition = '''
if not transition:
...
else
...
'''
I want to avoid defining transition
in the reaction
equations and have it instead directly passed from the reaction.thresholder
or whatever evaluates the threshold condition. Something in the spirit of lastspike
.