A MATLAB neuron simulator. Very fast (written in C++). Flexible (fully object oriented). Immediate (live manipulation in MATLAB). Comes with a powerful parameter optimizer. Get started ➡️
and they are ordered this way due to alphabetical reasons.
All the c# mechanims read out some value that is computed by x1. The problem now is that c1 and c2 use the old value of x1, and c3 and c4 use the new value of x1, because of the alphabetical listing that determines the order of integration. This is bad. (Realistically, for small dt, this is a non-problem)
The solution
On mechanism addition, the compartment queries the full state size of that mechanism
On initialization, (when all mechs have been added) the compartment creates an array that can store all states from all mechs. Let's call this array mech_states.
After calling integrateMechanisms, read out all mechanism states into mech_states
mechanisms will offer some syntactic sugar (like a getPrevState method) that will read out the correct parts of mech_states
The Problem:
compartment
can have the following mechanisms:and they are ordered this way due to alphabetical reasons.
All the
c#
mechanims read out some value that is computed byx1
. The problem now is thatc1
andc2
use the old value ofx1
, andc3
andc4
use the new value ofx1
, because of the alphabetical listing that determines the order of integration. This is bad. (Realistically, for small dt, this is a non-problem)The solution
mech_states
.integrateMechanisms
, read out all mechanism states intomech_states
getPrevState
method) that will read out the correct parts ofmech_states