AnimatLab  2
Test
AnimatCarlSim::CsNeuronGroup Class Reference

Firing Rate Neuron model. More...

#include <CsNeuronGroup.h>

+ Inheritance diagram for AnimatCarlSim::CsNeuronGroup:
+ Collaboration diagram for AnimatCarlSim::CsNeuronGroup:

Public Member Functions

 CsNeuronGroup ()
 Default constructor. More...
 
virtual ~CsNeuronGroup ()
 Destructor. More...
 
virtual void A (float fltVal)
 
virtual float A ()
 
boost::interprocess::interprocess_mutex * AccessRecentSpikes ()
 mutex used to try and access matches variable.
 
virtual void AddExternalNodeInput (int iTargetDataType, float fltInput)
 Adds an external node input. More...
 
virtual void B (float fltVal)
 
virtual float B ()
 
virtual void C (float fltVal)
 
virtual float C ()
 
virtual void CollectFromWholePopulation (bool bVal)
 
virtual bool CollectFromWholePopulation ()
 
virtual bool CollectingSpikeDataForNeuron (int iIdx)
 
virtual void Copy (CStdSerialize *lpSource)
 
virtual void D (float fltVal)
 
virtual float D ()
 
virtual void DecrementCollectSpikeDataForNeuron (int iIdx)
 
virtual void EnableCOBA (bool bVal)
 
virtual bool EnableCOBA ()
 
virtual void EnableSTDP (bool bVal)
 
virtual bool EnableSTDP ()
 
virtual void EnableSTP (bool bVal)
 
virtual bool EnableSTP ()
 
CsNeuralModuleGetCsModule ()
 
virtual float * GetDataPointer (const std::string &strDataType)
 Returns a float pointer to a data item of interest in this object. More...
 
virtual void GroupID (int iVal)
 
virtual int GroupID ()
 
virtual void IncrementCollectSpikeDataForNeuron (int iIdx)
 
virtual void Initialize ()
 Initializes this object. More...
 
virtual void Load (CStdXml &oXml)
 
virtual void MaxLTD (float fltVal)
 
virtual float MaxLTD ()
 
virtual void MaxLTP (float fltVal)
 
virtual float MaxLTP ()
 
virtual void NeuralType (std::string strType)
 
virtual void NeuralType (int iVal)
 
virtual int NeuralType ()
 
virtual void NeuronCount (unsigned int iVal)
 
virtual unsigned int NeuronCount ()
 
virtual void QueryProperties (CStdPtrArray< TypeProperty > &aryProperties)
 
virtual void ResetSimulation ()
 Resets the simulation back to time 0. More...
 
virtual void SetCARLSimulation ()
 
virtual bool SetData (const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual void SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify)
 
virtual std::multimap< int, unsigned long > * SpikeTimes ()
 
virtual void StdA (float fltVal)
 
virtual float StdA ()
 
virtual void StdB (float fltVal)
 
virtual float StdB ()
 
virtual void StdC (float fltVal)
 
virtual float StdC ()
 
virtual void StdD (float fltVal)
 
virtual float StdD ()
 
virtual void StepSimulation ()
 Step the simulation for this object. More...
 
virtual void TauAMPA (float fltVal)
 
virtual float TauAMPA ()
 
virtual void TauDepression (float fltVal)
 
virtual float TauDepression ()
 
virtual void TauFacilitation (float fltVal)
 
virtual float TauFacilitation ()
 
virtual void TauGABAa (float fltVal)
 
virtual float TauGABAa ()
 
virtual void TauGABAb (float fltVal)
 
virtual float TauGABAb ()
 
virtual void TauLTD (float fltVal)
 
virtual float TauLTD ()
 
virtual void TauLTP (float fltVal)
 
virtual float TauLTP ()
 
virtual void TauNMDA (float fltVal)
 
virtual float TauNMDA ()
 
virtual void U (float fltVal)
 
virtual float U ()
 
virtual void update (CpuSNN *s, int grpId, unsigned int *NeuronIds, unsigned int *timeCounts, unsigned int total_spikes, float firing_Rate)
 Controls actions that are performed when certain neurons fire (user-defined). More...
 
virtual void VerifySystemPointers ()
 Verify that system pointers have been set correctly. More...
 
- Public Member Functions inherited from AnimatSim::Node
 Node ()
 Default constructor. More...
 
virtual ~Node ()
 Destructor. More...
 
virtual bool Enabled ()
 Tells whether this node is enabled. More...
 
virtual void Enabled (bool bValue)
 Enables the node. More...
 
virtual int GetTargetDataTypeIndex (const std::string &strDataType)
 Used to convert a string target data type into an integer index. More...
 
virtual void Kill (bool bState=true)
 Kills. More...
 
virtual void QueryProperties (CStdPtrArray< TypeProperty > &aryProperties)
 Queries this object for a list of properties that can be changed using SetData. More...
 
virtual void SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify)
 Sets the system pointers. More...
 
- Public Member Functions inherited from AnimatSim::AnimatBase
 AnimatBase ()
 Constructs an AnimatBase object. More...
 
virtual ~AnimatBase ()
 Destroys the AnimatBase object.. More...
 
virtual bool AddItem (const std::string &strItemType, const std::string &strXml, bool bThrowError=true, bool bDoNotInit=false)
 Adds a new object to this parent. More...
 
virtual void AfterResetSimulation ()
 Called after a simulation reset for some objects. More...
 
virtual long CalculateSnapshotByteSize ()
 Calculates the snapshot byte size. More...
 
virtual NeuralModuleGetNeuralModule ()
 Gets the neural module. More...
 
virtual NodeGetNode ()
 Gets the node. More...
 
virtual SimulatorGetSimulator ()
 Gets the simulator pointer. More...
 
virtual StructureGetStructure ()
 Gets the structure for this node. More...
 
virtual bool HasProperty (const std::string &strName)
 Queries this object if it has a property with the given name. More...
 
virtual std::string ID ()
 Gets the unique GUID ID of this object. More...
 
virtual void ID (std::string strValue)
 Sets the unique GUID ID of the object. More...
 
virtual void Load (StdUtils::CStdXml &oXml)
 Loads the item using an XML data packet. More...
 
virtual void LoadKeyFrameSnapshot (byte *aryBytes, long &lIndex)
 Loads a key frame snapshot. More...
 
virtual std::string Name ()
 Gets the name of this object. More...
 
virtual void Name (std::string strValue)
 Sets the name of the object. Blank is acceptable. More...
 
virtual AnimatPropertyType PropertyType (const std::string &strName)
 
virtual void ReInitialize ()
 Re-initialize this object. More...
 
virtual bool RemoveItem (const std::string &strItemType, const std::string &strID, bool bThrowError=true)
 Removes a child item from this parent. More...
 
virtual void Reset ()
 Resets this object. More...
 
virtual void RigidBodyAdded (std::string strID)
 
virtual void RigidBodyRemoved (std::string strID)
 
virtual void SaveKeyFrameSnapshot (byte *aryBytes, long &lIndex)
 Saves a key frame snapshot. More...
 
virtual bool Selected ()
 Tells if this items is selected or not. More...
 
virtual void Selected (bool bValue, bool bSelectMultiple)
 Selects this object. More...
 
virtual bool SetData (const std::string &strDataType, const float fltValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual bool SetData (const std::string &strDataType, const long lValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual void SimPausing ()
 Called just before the simulation pauses. More...
 
virtual void SimStarting ()
 Called just before the simulation starts. More...
 
virtual void SimStopping ()
 Called just before the simulation stops. More...
 
virtual void TimeStepModified ()
 Notification method that the time step modified has been modified. Objects should recalculate any slice times as needed. More...
 
virtual std::string Type ()
 returns the string type name of this object. More...
 
virtual void Type (std::string strValue)
 Sets the class type for this object. More...
 
virtual void VisualSelectionModeChanged (int iNewMode)
 Visual selection mode changed. More...
 

Public Attributes

boost::signals2::signal< void(int, int, long)> MonitoredSpikeEvent
 

Protected Attributes

boost::interprocess::interprocess_mutex m_AccessRecentSpikes
 mutex used to try and access matches variable.
 
CStdMap< int, int > m_aryCollectSpikeData
 An array of neuron indices for individual neurons we want to collect spike data for throughout the current simulation run.
 
std::multimap< int, unsigned long > m_arySpikeTimes
 A map for keeping track of a spike times in ms for individual neurons in this group throughout the current simulation run.
 
bool m_bEnableCOBA
 
bool m_bEnableSTDP
 Tells whether this group of neurons exhibits spike-timing dependent plasticity.
 
bool m_bEnableSTP
 Tells whether this group of neurons exhibits Short term plasticity.
 
float m_fltA
 The Izhikevich A parameter.
 
float m_fltB
 The Izhikevich B parameter.
 
float m_fltC
 The Izhikevich C parameter.
 
float m_fltD
 The Izhikevich D parameter.
 
float m_fltGroupFiringRate
 The firing rate of this entire group of neurons.
 
float m_fltGroupTotalSpikes
 The total number of spikes generated by this group of neurons in the last time slice.
 
float m_fltMaxLTD
 the max magnitude for LTD change for STDP
 
float m_fltMaxLTP
 the max magnitude for LTP change for STDP
 
float m_fltSpikeFake
 
float m_fltStdA
 The standard deviation for Izhikevich parameter A.
 
float m_fltStdB
 The standard deviation for Izhikevich parameter B.
 
float m_fltStdC
 The standard deviation for Izhikevich parameter C.
 
float m_fltStdD
 The standard deviation for Izhikevich parameter D.
 
float m_fltTauAMPA
 Time constant of AMPA decay (ms); for example, 5.0.
 
float m_fltTauDepression
 the time constant for depression term for STP
 
float m_fltTauFacilitation
 the time constant for facilitation term for STP
 
float m_fltTauGABAa
 Time constant of GABAa decay (ms); for example, 6.0.
 
float m_fltTauGABAb
 Time constant of GABAb decay (ms); for example, 150.0.
 
float m_fltTauLTD
 the decay time constant for LTD change for STDP
 
float m_fltTauLTP
 the decay time constant for LTP change for STDP
 
float m_fltTauNMDA
 Time constant of NMDA decay (ms); for example, 150.0.
 
float m_fltU
 the increment of u due to a spike for STP
 
int m_iCollectWholePopulation
 If > 0 it collects data from the whole population. This is an iterator keeping track of how many things have told it to collect the whole population.
 
int m_iGroupID
 The group ID of this set of neurons.
 
int m_iNeuralType
 
unsigned long m_lLastUpdateTime
 The last time step for which the monitor method ran.
 
CsNeuralModulem_lpCsModule
 Pointer to parent CsNeuralModule.
 
unsigned long m_lTotalSpikesCollected
 
unsigned int m_uiNeuronCount
 The number of neurons in this group.
 
- Protected Attributes inherited from AnimatSim::Node
bool m_bInitEnabled
 Keeps track of the enabled state at sim startup.
 
float m_fltEnabled
 This is used for reporting the enabled state in a GetDataPointer call.
 
Organism * m_lpOrganism
 The pointer to this node's organism.
 
- Protected Attributes inherited from AnimatSim::AnimatBase
bool m_bEnabled
 Tells if this item is enabled or not. If it is not enabled then it is not run.
 
bool m_bSelected
 Tells whether the object is selected or not.
 
AnimatSim::Behavior::NeuralModulem_lpModule
 The pointer to this items parentNeuralModule. If this is not relevant for this object then this is NULL.
 
Nodem_lpNode
 The pointer to this items parent Node. If this is not relevant for this object then this is NULL.
 
Simulatorm_lpSim
 The pointer to a Simulation.
 
AnimatSim::Environment::Structurem_lpStructure
 The pointer to this items parent Structure. If this is not relevant for this object then this is NULL.
 
std::string m_strID
 The unique Id for this object.
 
std::string m_strName
 The name for this object.
 
std::string m_strType
 The type for this object. Examples are Box, Plane, Neuron, etc..
 

Additional Inherited Members

- Static Public Member Functions inherited from AnimatSim::Node
static NodeCastToDerived (AnimatBase *lpBase)
 
- Protected Member Functions inherited from AnimatSim::Node
virtual void UpdateData ()
 Updates any reporting data for this time step. More...
 

Detailed Description

Firing Rate Neuron model.

This Neuron implements a firing rate neural model. The firing rate model is a more abstract representation of the neuron than an integrate and fire system. This type of model assumes that there is a linear relationship between cell depolarization and firing rate. After the neuron has depolarized beyond its threshold its firing rate increases linearly between 0 and 1 relative to the membrane potential and a gain value. Synapses inject current into post-synaptic neurons based on the firing rate. The synaptic weight is the amount of current to inject, and this is multiplied by the firing rate of the pre-synaptic neuron. this model also has modulatory and gated synapses.
Another feature of this model is that there are a few different types of neruons. These primarily differ based on how they implement intrinsic currents. Intrinsic currents are currents that are internal to the neuron. An exmample of this is the pacemaker neuron that generates currents internally to model bursting behavior.

Author
dcofer
Date
3/29/2011

Definition at line 28 of file CsNeuronGroup.h.

Constructor & Destructor Documentation

AnimatCarlSim::CsNeuronGroup::~CsNeuronGroup ( )
virtual

Destructor.

Author
dcofer
Date
3/29/2011

Definition at line 72 of file CsNeuronGroup.cpp.

References StdUtils::Std_TraceMsg().

+ Here is the call graph for this function:

Member Function Documentation

void AnimatCarlSim::CsNeuronGroup::AddExternalNodeInput ( int  iTargetDataType,
float  fltInput 
)
virtual

Adds an external node input.

This is used by the adapter to add a new external value to this node. It is up to the node to interpret what that value means. For example, if it is a neuron then it can interpret it to be a current. This value is added to the current total so that multiple adapters can call this in a given time step. It is cleared out to zero at the beginning of the time step. You can now also specify which data you are adding to for this method call. This allows adapters to be setup to change multiple different variables in the system.

Author
dcofer
Date
6/16/2014
Parameters
iTargetDataTypeThe index of the target data type we are adding to.
fltInputThe new input.

Implements AnimatSim::Node.

Reimplemented in AnimatCarlSim::CsSpikeGeneratorGroup.

Definition at line 436 of file CsNeuronGroup.cpp.

float * AnimatCarlSim::CsNeuronGroup::GetDataPointer ( const std::string &  strDataType)
virtual

Returns a float pointer to a data item of interest in this object.

This is a generic method used to get a pointer to data variable of interest. It is used by a variety of systems in the simulation. The most prominent are the data charting and stimulus classes. Within this method we associate a variable with a string name. By passing in the name of the data type we are interested in we can recieve back a float pointer to that data type. We can use that to read or set the data item in other classes. For example, the data charting system gets the pointer and then each time it needs to log a data point it reads the value into an array.

Author
dcofer
Date
2/22/2011
Parameters
strDataTypename of the data item for which we are looking.
Returns
float pointer of the data item. If not found then it throws an exception.
Exceptions
IfDataType is not found.

Reimplemented from AnimatSim::AnimatBase.

Definition at line 653 of file CsNeuronGroup.cpp.

References AnimatSim::Node::m_fltEnabled, m_fltGroupFiringRate, m_fltGroupTotalSpikes, m_fltSpikeFake, and StdUtils::Std_CheckString().

+ Here is the call graph for this function:

void AnimatCarlSim::CsNeuronGroup::Initialize ( )
virtual

Initializes this object.

After an object is loaded in it must be initialized before it can be used. This allows the object to retrieve any pointers or setup memory that it will need during execution. Each object is responsible for initializing any of its child objects, so you simply need to call this method on the containing class to init all child objects. It also calls VerifySystemPointers to make sure that the system pointers have been setup correctly.

Author
dcofer
Date
3/1/2011

Reimplemented from AnimatSim::AnimatBase.

Reimplemented in AnimatCarlSim::CsSpikeGeneratorGroup.

Definition at line 414 of file CsNeuronGroup.cpp.

Referenced by AnimatCarlSim::CsNeuralModule::AddNeuronGroup(), and AnimatCarlSim::CsSpikeGeneratorGroup::Initialize().

+ Here is the caller graph for this function:

void AnimatCarlSim::CsNeuronGroup::ResetSimulation ( )
virtual

Resets the simulation back to time 0.

This method calls the ResetSimulation method on all subitems in order to reset the simulation back to the beginning.

Author
dcofer
Date
3/1/2011

Reimplemented from AnimatSim::Node.

Definition at line 424 of file CsNeuronGroup.cpp.

References m_arySpikeTimes, m_fltGroupFiringRate, m_fltGroupTotalSpikes, m_fltSpikeFake, and m_lLastUpdateTime.

bool AnimatCarlSim::CsNeuronGroup::SetData ( const std::string &  strDataType,
const std::string &  strValue,
bool  bThrowError = true 
)
virtual

Set a variable based on a string data type name.

This is a generic method that can be used to set any variable in an AnimatBase object by specifying the name of the variable and a string representation of that data. The GUI uses this method to set data into variables in the simulation when the user changes them in the UI. The value string can be as simple as a float or int, or as complex as an xml packet. It is the developers responsibilty to know what type of data is needed and to process it accordingly.

Author
dcofer
Date
2/22/2011
Parameters
strDataTypestring name of the data type to set.
strValueThe string value of the data. It is up to the developer to determine what this should be. For example, in most cases it is simply a float and you just have to convert it to a float and make the appropriate mutator method call. However, it can be any type of string, including an entire xml packet. It is the developers responsibility to know how to set and process the data as required.
bThrowErrortrue to throw error if there is a problem. If false then it will not return an error, just return false.
Returns
true if it succeeds, false if it fails.

Reimplemented from AnimatSim::Node.

Reimplemented in AnimatCarlSim::CsSpikeGeneratorGroup.

Definition at line 462 of file CsNeuronGroup.cpp.

References StdUtils::Std_CheckString(), and StdUtils::Std_ToBool().

Referenced by AnimatCarlSim::CsSpikeGeneratorGroup::SetData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AnimatCarlSim::CsNeuronGroup::StepSimulation ( )
virtual

Step the simulation for this object.

This is called on an object each time it is stepped in the simulation. this is where its simulation code is processed. However, StepSimulation is not necessarily called every single time that the simulation as a whole is stepped. A good example of this is that neural modules can have different integration time steps. So a firing rate module may have a DT of 0.5 ms, while an integrate and fire model may have one of 0.1 ms. So the firing rate module would only get its StepSimulation method called every 5th time that the other module was called. This is all handed in the StepSimulation method of the Simulator and NervousSystem.

Author
dcofer
Date
3/1/2011

Reimplemented from AnimatSim::AnimatBase.

Reimplemented in AnimatCarlSim::CsSpikeGeneratorGroup.

Definition at line 419 of file CsNeuronGroup.cpp.

void AnimatCarlSim::CsNeuronGroup::update ( CpuSNN s,
int  grpId,
unsigned int *  Nids,
unsigned int *  timeCnts,
unsigned int  total_spikes,
float  firing_Rate 
)
virtual

Controls actions that are performed when certain neurons fire (user-defined).

Attention
The virtual method should never be called directly

Reimplemented from SpikeMonitor.

Definition at line 371 of file CsNeuronGroup.cpp.

References m_AccessRecentSpikes, m_aryCollectSpikeData, m_arySpikeTimes, m_fltGroupFiringRate, m_fltGroupTotalSpikes, m_iCollectWholePopulation, and m_lLastUpdateTime.

void AnimatCarlSim::CsNeuronGroup::VerifySystemPointers ( )
virtual

Verify that system pointers have been set correctly.

The system pointers should be set just after an object is created. However, if for some reason it was not then this could cause read/write memory access errors later on because we would be using NULL pointers. This method is called during SetSystemPointers, Load, and Initialize to verify that the pointers for that type of object have been set correctly. We are calling three different places to ensure that it is checked before use. For example, if you are doing a Load call then you want to check it before attempting the load, but there may be an object that does not Load, but only does Initialize. So we need to check it there as well.

Author
dcofer
Date
3/4/2011

Reimplemented from AnimatSim::Node.

Definition at line 449 of file CsNeuronGroup.cpp.

References AnimatSim::AnimatBase::ID(), m_lpCsModule, AnimatSim::Node::m_lpOrganism, and AnimatSim::AnimatBase::m_strID.

+ Here is the call graph for this function:

Member Data Documentation

bool AnimatCarlSim::CsNeuronGroup::m_bEnableCOBA
protected

Enables or disables conductance based neuron modelling. If false the neurons in this group will use current based modelling.

Definition at line 69 of file CsNeuronGroup.h.

Referenced by CsNeuronGroup().

float AnimatCarlSim::CsNeuronGroup::m_fltSpikeFake
protected

Fakes spike data for the CsNeuronDataColumn to read. This will always be Null chart value of -99999. It is mainly here for it to have something to connect to. Spike data will actually be filled in later from the list of spike timing data collected during the run.

Definition at line 120 of file CsNeuronGroup.h.

Referenced by CsNeuronGroup(), GetDataPointer(), and ResetSimulation().


The documentation for this class was generated from the following files: