This commit is contained in:
ton
2023-09-15 21:11:43 +07:00
parent 7ad96f8622
commit 1cc135c911
4 changed files with 937 additions and 44 deletions

View File

@@ -313,20 +313,21 @@ function lifForward( zit,
(zit[i1,i2,i3,i4] * !iszero(wRec[i1,i2,i3,i4]))
# !iszero indicates synaptic subscription
synapticActivityCounter[i1,i2,i3,i4] = zit[i1,i2,i3,i4] * !iszero(wRec[i1,i2,i3,i4])
if !iszero(wRec[i1,i2,i3,i4]) # check if this is wRec subscription
synapseReconnectDelay[i1,i2,i3,i4] -= 1
if synapseReconnectDelay[i1,i2,i3,i4] == 0
# mark timestep
synapseReconnectDelay[i1,i2,i3,i4] = sum(timeStep)
wRec[i1,i2,i3,i4] = -1.0 # mark for reconnect
end
end
synapticActivityCounter[i1,i2,i3,i4] += zit[i1,i2,i3,i4] * !iszero(wRec[i1,i2,i3,i4])
# voltage regulator
wRecChange[i1,i2,i3,i4] = -0.01*0.0001 * (vt[i1,i2,i3,i4] - vth[i1,i2,i3,i4]) *
zit[i1,i2,i3,i4]
if !iszero(wRec[i1,i2,i3,i4]) && # check if this is wRec subscription
synapseReconnectDelay[i1,i2,i3,i4] != 0
synapseReconnectDelay[i1,i2,i3,i4] -= 1
if synapseReconnectDelay[i1,i2,i3,i4] == 0
# mark timestep
synapseReconnectDelay[i1,i2,i3,i4] = sum(timeStep)
end
end
end
end
return nothing
@@ -521,18 +522,21 @@ function alifForward( zit,
(phi[i1,i2,i3,i4] * epsilonRec[i1,i2,i3,i4])) +
(zit[i1,i2,i3,i4] * !iszero(wRec[i1,i2,i3,i4]))
synapticActivityCounter[i1,i2,i3,i4] = zit[i1,i2,i3,i4] * !iszero(wRec[i1,i2,i3,i4])
synapticActivityCounter[i1,i2,i3,i4] += zit[i1,i2,i3,i4] * !iszero(wRec[i1,i2,i3,i4])
if !iszero(wRec[i1,i2,i3,i4]) # check if this is wRec subscription
synapseReconnectDelay[i1,i2,i3,i4] -= 1
if synapseReconnectDelay[i1,i2,i3,i4] == 0
synapseReconnectDelay[i1,i2,i3,i4] = sum(timeStep)
wRec[i1,i2,i3,i4] = -1.0 # mark for reconnect
end
end
# voltage regulator
wRecChange[i1,i2,i3,i4] = -0.01*0.0001 * (vt[i1,i2,i3,i4] - avth[i1,i2,i3,i4]) *
zit[i1,i2,i3,i4]
if !iszero(wRec[i1,i2,i3,i4]) && # check if this is wRec subscription
synapseReconnectDelay[i1,i2,i3,i4] != 0
synapseReconnectDelay[i1,i2,i3,i4] -= 1
if synapseReconnectDelay[i1,i2,i3,i4] == 0
# mark timestep
synapseReconnectDelay[i1,i2,i3,i4] = sum(timeStep)
end
end
end
end
return nothing