class Compartment

The compartment is where the actual computation of cell activity takes place.

Public Fields

[more]int CmpID
ID of this cmp within the parent cell
[more]Message* IncomingMsgs
Pointer to base of linked list
[more]double VoltageMembraneRest
the resting membrane voltage of the compartment
[more]double VoltageMembrane
the membrane voltage Vm
[more]double CalciumInternal
Concentration of Calcium particle internal to the compartment
[more]double CalciumExternal
Concentration of Calcium particle external to the compartment
[more]double CaSpikeInc
Change in Calcium due to spike
[more]double Ca_Persistence
Calcium particle resistance to change
[more]double Calcium_Tau
Calcium time constant
[more]int maxSendTo
used?
[more]int nSendTo
The number of compartments ~this~ send to
[more]SENDITEM* SendTo
Linked list of information concerning compartments this one sends to
[more]int nSpikeShape
number of voltages in spike
[more]double* SpikeShape
Array of voltage values that make up spike shape
[more]int nChannels
Number of channels inside this
[more]Channel** vChannels
Array of pointers to channel objects
[more]int nSynapse
Total synapses
[more]int nPosLearnSynapse
Number that do positive learning
[more]int iOtherSynapse
Starting index of other synapses
[more]Synapse** SynapseList
Linked list of pointers to synapse objects
[more]int nDT
Number of timesteps since last calc
[more]int LastFireTime
time of the most recent Action Potential
[more]bool Active
Compartment designed to integrate and fire.
[more]int RefractoryTime
Countdown from SpikeSize value to 0, when < 0 the refractory period is over
[more]double dt_C
dt/C where dt = 1/FSV and C = Tau_Membrane_mean/R_Membrane_mean
[more]double Capacitance
Calculated Capacitance of compartment - farads
[more]double Current_Leak
i_leak in the integration function
[more]double TotalChannelCurrent
Sum of the current for all the channels
[more]double TotalSynapseCurrent
Sum of the current for all the synapses
[more]double TotalStimulusCurrent
Sum of the current for all the stimulus values at this time step
[more]double TotalAdjacentCompartmentCurrent
Current coming in from adjacent compartments within this cell
[more]double NetCurrent
netI - total of the four previous summed together, subtracting Current_Leak
[more]bool VoltageClamp
When true, it signals that we are to use a different equation for the membrane voltage
[more]double StimulusVoltage
Membrance voltage to use when in a voltage clamp
[more]double Threshold
When compartment reaches threshold, a spike is generated and transmitted along all synapses out
[more]double Leak_G
Conductance of current (I) leak
[more]double dt
Each timestep 1/FSV
[more]double Persistance
Deacy factor for the membrane voltage
[more]int CompartmentDelay
The delay of synapse transmission after being converted to ticks from seconds
[more]CircleList stateBuffer
Data Structure to keep track of a compartment's previous states.
[more]int nForward
Number of compartment connections that use this compartment as a source
[more]int nReverse
Number of compartment connections that use this compartment as a destination
[more]T_CMPCONNECT** forwardConn
Array of pointers to the forward connections (stored in the original input)
[more]T_CMPCONNECT** reverseConn
Array of pointers to the reverse connections (stored in the original input)
[more]int SpikeIndex
Spike shape index into ARRAYS structure

Public Methods

[more] Compartment()
default constructor
[more] Compartment(T_CMP* iCmp, int CELLID, int CMPID, int kdx, RandomManager* RM, ARRAYS* AR)
Primary constructor used: called within BuildBraincpp
[more] ~Compartment()
Destructor must free channels, synapses, SendTo
[more]void DoProcessCompartment(int TimeStep)
Main compartment processing function.
[more]void AddSynapseToActive(Synapse* Syn, double Value)
Handles processing of a spike message from another cell.
[more]void ReceiveStimC(Message* Msg)
Interface provided for MessageBus to give this compartment Stimulus Current (I)
[more]void ReceiveStimV(Message* )
Interface provided for MessageBus to give this compartment Stimulus Voltage (V)
[more]double GetSynapseCurrent(void)
Sums contributions from all active synapses to give a total synapse current.
[more]void Fire(int)
Check to see if the threshold has been reached, and if so fire an action potential with the designated spike pattern for this compartment
[more]void DoPositiveLearning(int TimeStep)
Go through designated synapses and check for conditions that allow for Hebbian learning.
[more]double GetMembraneVoltage()
[more]double GetCalciumInternal()
[more]double GetCalciumExternal()
[more]double GetDT()
[more]void DoReport(Cell* , int)
Not defined?
[more]int TotalItems(int family)
Number of items reported on for a particular channel family
[more]int NumFamily(int family)
Count up total number of channels in this compartment belonging to a particular family
[more]void ReportChannel(int family, float* buf, int* nitems)
Populate data buffer with specified channel's information for reporting
[more]int Save(FILE* out )
Write compartment data to a file stream.
[more]int SaveConnections( vector<Synapse* > &collection, int targetNode )
Finish writing compartment data to a file.
[more]void Load(FILE* in, char* nothing)
Read compartment data from a file stream
[more]void LoadConnections( deque<Synapse*> &collection, int targetNode )
Finish loading compartment data from a file.
[more]void SetForwardConnections( int nConnect, T_CMPCONNECT** connections )
Set variables for Forward Connections (ie.
[more]void SetReverseConnections( int nConnect, T_CMPCONNECT** connections )
Set variables for Reverse Connections (ie.
[more]void ProcessAdjacentCompartments( int TimeStep )
Calculate the current adjustment in this compartment due to connections with adjacent compartments
[more]void InitBuffer( int size )
Allocate the minimum number of elements for the stateBuffer.
[more]void UpdateBuffer()
Insert the latest Compartment state into the stateBuffer, overwriting the oldest state if the buffer is full
[more]void PrepareStimulusCurrent()
Helper function to set the TotalStimulusCurrent value to zero after the Brain has finished reporting in the DoThink loop.

Public Members

[more] For debug, the input structure which defines cmp


Documentation

The compartment is where the actual computation of cell activity takes place. It computes the internal membrane potential, and when this reaches a critical level, generates an action potential (AP). The compartment may contain channels, the internal computations of which are part of the dynamics.

In addition to the channels, the compartment contains two other lists of objects. The SendTo list contains the addresses of the cells which receive a message whenever the cell generates its AP. The SynapseList is a list of Synapse objects, each of which represents a connection to another cell from which this cell can receive an AP.

Cells may potentially include more than one compartment. If & when this is implemented, the compartments within a cell will need to exchange information. This should NOT be done via the MessageBus, for efficiency.

o For debug, the input structure which defines cmp
For debug, the input structure which defines cmp

oint CmpID
ID of this cmp within the parent cell

oMessage* IncomingMsgs
Pointer to base of linked list

odouble VoltageMembraneRest
the resting membrane voltage of the compartment

odouble VoltageMembrane
the membrane voltage Vm

odouble CalciumInternal
Concentration of Calcium particle internal to the compartment

odouble CalciumExternal
Concentration of Calcium particle external to the compartment

odouble CaSpikeInc
Change in Calcium due to spike

odouble Ca_Persistence
Calcium particle resistance to change

odouble Calcium_Tau
Calcium time constant

oint maxSendTo
used?

oint nSendTo
The number of compartments ~this~ send to

oSENDITEM* SendTo
Linked list of information concerning compartments this one sends to

oint nSpikeShape
number of voltages in spike

odouble* SpikeShape
Array of voltage values that make up spike shape

oint nChannels
Number of channels inside this

oChannel** vChannels
Array of pointers to channel objects

oint nSynapse
Total synapses

oint nPosLearnSynapse
Number that do positive learning

oint iOtherSynapse
Starting index of other synapses

oSynapse** SynapseList
Linked list of pointers to synapse objects

oint nDT
Number of timesteps since last calc

oint LastFireTime
time of the most recent Action Potential

obool Active
Compartment designed to integrate and fire. i.e. has spike shape, threshold

oint RefractoryTime
Countdown from SpikeSize value to 0, when < 0 the refractory period is over

odouble dt_C
dt/C where dt = 1/FSV and C = Tau_Membrane_mean/R_Membrane_mean

odouble Capacitance
Calculated Capacitance of compartment - farads

odouble Current_Leak
i_leak in the integration function

odouble TotalChannelCurrent
Sum of the current for all the channels

odouble TotalSynapseCurrent
Sum of the current for all the synapses

odouble TotalStimulusCurrent
Sum of the current for all the stimulus values at this time step

odouble TotalAdjacentCompartmentCurrent
Current coming in from adjacent compartments within this cell

odouble NetCurrent
netI - total of the four previous summed together, subtracting Current_Leak

obool VoltageClamp
When true, it signals that we are to use a different equation for the membrane voltage

odouble StimulusVoltage
Membrance voltage to use when in a voltage clamp

odouble Threshold
When compartment reaches threshold, a spike is generated and transmitted along all synapses out

odouble Leak_G
Conductance of current (I) leak

odouble dt
Each timestep 1/FSV

odouble Persistance
Deacy factor for the membrane voltage

oint CompartmentDelay
The delay of synapse transmission after being converted to ticks from seconds

oCircleList stateBuffer
Data Structure to keep track of a compartment's previous states. Currently only tracks compartment voltages. The size of the buffer is determined by how great of a connection delay exists between this compartment and all other compartments connected to it.

oint nForward
Number of compartment connections that use this compartment as a source

oint nReverse
Number of compartment connections that use this compartment as a destination

oT_CMPCONNECT** forwardConn
Array of pointers to the forward connections (stored in the original input)

oT_CMPCONNECT** reverseConn
Array of pointers to the reverse connections (stored in the original input)

oint SpikeIndex
Spike shape index into ARRAYS structure

o Compartment()
default constructor

o Compartment(T_CMP* iCmp, int CELLID, int CMPID, int kdx, RandomManager* RM, ARRAYS* AR)
Primary constructor used: called within BuildBraincpp
Parameters:
iCmp - Intermediate object generated from input containing compartment template
CELLID - unique value identifying this compartment's parent cell
CMPID - unique value identifying this compartment among parent cell's compartment list
kdx - index of iCmp in parsed data AR
RM - Manager of random number generators
- AR User input data in parsed and structured format

o ~Compartment()
Destructor must free channels, synapses, SendTo

ovoid DoProcessCompartment(int TimeStep)
Main compartment processing function. Calls all synapses and channels of this compartment
Parameters:
- TimeStep iteration of Brain::DoThink

ovoid AddSynapseToActive(Synapse* Syn, double Value)
Handles processing of a spike message from another cell. It adds the synapse to the list of active synapses by getting an ACTIVESYN pointer from the pool, filling it with pointers to the Synapse and PSC templates, and setting the count. At each subsequent timestep, the value of template [count] will be added to the total, and the count decremented. When it reaches zero, the PSC is over, and the synapse becomes inactive again. Note that any particular synapse may be in the active list several times, since a new spike may start (spike msg is received) before a prior one has reached the end of the template. Thus there may be several ongoing PSCs at different points in the template.
Parameters:
- Syn spiking synapse
Value - Synaptic value

ovoid ReceiveStimC(Message* Msg)
Interface provided for MessageBus to give this compartment Stimulus Current (I)
Parameters:
Msg - Message contain current in field StimC.Current

ovoid ReceiveStimV(Message* )
Interface provided for MessageBus to give this compartment Stimulus Voltage (V)
Parameters:
Msg - Message containing voltage in field StimV.Voltage

odouble GetSynapseCurrent(void)
Sums contributions from all active synapses to give a total synapse current. Checks each synapse to see if it has reached the end of the template, and if so, removes it from the active list.
Returns:
final calculated synapse current (I)

ovoid Fire(int)
Check to see if the threshold has been reached, and if so fire an action potential with the designated spike pattern for this compartment
Parameters:
- TimeStep iteration of Brain::DoThink

ovoid DoPositiveLearning(int TimeStep)
Go through designated synapses and check for conditions that allow for Hebbian learning.
Parameters:
- TimeStep iteration of Brain::DoThink

odouble GetMembraneVoltage()
Returns:
compartment's membrane voltage

odouble GetCalciumInternal()
Returns:
concentration of Calcium internal to this compartment

odouble GetCalciumExternal()
Returns:
concentration of Calcium external to this compartment

odouble GetDT()
Returns:
1/FSV

ovoid DoReport(Cell* , int)
Not defined?

oint TotalItems(int family)
Number of items reported on for a particular channel family
Parameters:
- family Integer code of family type
Returns:
total number of items

oint NumFamily(int family)
Count up total number of channels in this compartment belonging to a particular family
Parameters:
- family Integer code of family type to count
Returns:
number of channels matching specified family code

ovoid ReportChannel(int family, float* buf, int* nitems)
Populate data buffer with specified channel's information for reporting
Parameters:
- family Integer code of family type to report on
buf - data buffer to store information on
nitems - address where final number of data items written into buffer, is dereferenced in function

oint Save(FILE* out )
Write compartment data to a file stream. This is only the first half of the compartment save. It saves data for this individual compartment and not any connection information (synapses, SendTo). That must be saved later for purposes of future loading.
Parameters:
out - the output stream
Returns:
the number of bytes written

oint SaveConnections( vector<Synapse* > &collection, int targetNode )
Finish writing compartment data to a file. This is the second half of the compartment save. It is called after all individual cell and compartments have been written. This is important to the loading of a brain state since memory addresses will need to be assigned and that cannot be done until all memory has been allocated.
Parameters:
out - File pointer to destination file.
Returns:
number of bytes written

ovoid Load(FILE* in, char* nothing)
Read compartment data from a file stream
Parameters:
in - the input stream
nothing - dummy string in case pointers need something to point to. Will hopefully be phased out.

ovoid LoadConnections( deque<Synapse*> &collection, int targetNode )
Finish loading compartment data from a file. This loads the second half of compartment data after all cells and compartments have been loaded. This is important because connection data requires that all memory be allocated so that pointers to synapstic sources and destinations can be configured. This function goes through its SendTo list. If any entries are for the target Node, it will take the first address of the queue.
Parameters:
collection - synapse memory addresses
targetNode - Node ID where the memory addresses are from.

ovoid SetForwardConnections( int nConnect, T_CMPCONNECT** connections )
Set variables for Forward Connections (ie. this compartment is the source )
Parameters:
- nConnect the number of connections
connections - pointer to array of pointers, each of which points to a connection

ovoid SetReverseConnections( int nConnect, T_CMPCONNECT** connections )
Set variables for Reverse Connections (ie. this compartment is the destination )
Parameters:
- nConnect the number of connections
connections - pointer to array of pointers, each of which points to a connection

ovoid ProcessAdjacentCompartments( int TimeStep )
Calculate the current adjustment in this compartment due to connections with adjacent compartments
Parameters:
- TimeStep the current TimeStep of the simulation

ovoid InitBuffer( int size )
Allocate the minimum number of elements for the stateBuffer.
Parameters:
- size the number of previous compartment states that must be retained

ovoid UpdateBuffer()
Insert the latest Compartment state into the stateBuffer, overwriting the oldest state if the buffer is full

ovoid PrepareStimulusCurrent()
Helper function to set the TotalStimulusCurrent value to zero after the Brain has finished reporting in the DoThink loop. This allows the MessageBus to directly add any new Stimulus Current to the Compartment so that it accumulates over potentially several stimuli.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.