AnimatLab
2
Test
|
Firing Rate Neuron model. More...
#include <CsSpikeGeneratorGroup.h>
Public Member Functions | |
CsSpikeGeneratorGroup () | |
Default constructor. More... | |
virtual | ~CsSpikeGeneratorGroup () |
Destructor. More... | |
virtual void | AddExternalNodeInput (int iTargetDataType, float fltInput) |
Adds an external node input. More... | |
virtual void | Copy (CStdSerialize *lpSource) |
virtual void | Initialize () |
Initializes this object. More... | |
virtual void | Load (CStdXml &oXml) |
virtual void | QueryProperties (CStdPtrArray< TypeProperty > &aryProperties) |
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 | SetSpikeRatesUpdated () |
virtual PoissonRate * | SpikeRates () |
virtual void | StepSimulation () |
Step the simulation for this object. More... | |
Public Member Functions inherited from AnimatCarlSim::CsNeuronGroup | |
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 | 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 | 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 () |
CsNeuralModule * | GetCsModule () |
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 | 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 | ResetSimulation () |
Resets the simulation back to time 0. 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 | 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 NeuralModule * | GetNeuralModule () |
Gets the neural module. More... | |
virtual Node * | GetNode () |
Gets the node. More... | |
virtual Simulator * | GetSimulator () |
Gets the simulator pointer. More... | |
virtual Structure * | GetStructure () |
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... | |
Protected Member Functions | |
virtual void | DeletePoissonRates () |
Protected Member Functions inherited from AnimatSim::Node | |
virtual void | UpdateData () |
Updates any reporting data for this time step. More... | |
Protected Attributes | |
PoissonRate * | m_lpSpikeRates |
unsigned int | m_uiBaseFiringRate |
unsigned int | m_uiRefPeriod |
The refractory period. | |
Protected Attributes inherited from AnimatCarlSim::CsNeuronGroup | |
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. | |
CsNeuralModule * | m_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::NeuralModule * | m_lpModule |
The pointer to this items parentNeuralModule. If this is not relevant for this object then this is NULL. | |
Node * | m_lpNode |
The pointer to this items parent Node. If this is not relevant for this object then this is NULL. | |
Simulator * | m_lpSim |
The pointer to a Simulation. | |
AnimatSim::Environment::Structure * | m_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 Node * | CastToDerived (AnimatBase *lpBase) |
Public Attributes inherited from AnimatCarlSim::CsNeuronGroup | |
boost::signals2::signal< void(int, int, long)> | MonitoredSpikeEvent |
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.
Definition at line 28 of file CsSpikeGeneratorGroup.h.
AnimatCarlSim::CsSpikeGeneratorGroup::CsSpikeGeneratorGroup | ( | ) |
Default constructor.
Definition at line 23 of file CsSpikeGeneratorGroup.cpp.
References m_uiRefPeriod.
|
virtual |
Destructor.
Definition at line 35 of file CsSpikeGeneratorGroup.cpp.
References StdUtils::Std_TraceMsg().
|
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.
iTargetDataType | The index of the target data type we are adding to. |
fltInput | The new input. |
Reimplemented from AnimatCarlSim::CsNeuronGroup.
Definition at line 99 of file CsSpikeGeneratorGroup.cpp.
|
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.
Reimplemented from AnimatCarlSim::CsNeuronGroup.
Definition at line 89 of file CsSpikeGeneratorGroup.cpp.
References AnimatCarlSim::CsNeuronGroup::Initialize().
|
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.
strDataType | string name of the data type to set. |
strValue | The 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. |
bThrowError | true to throw error if there is a problem. If false then it will not return an error, just return false. |
Reimplemented from AnimatCarlSim::CsNeuronGroup.
Definition at line 105 of file CsSpikeGeneratorGroup.cpp.
References AnimatCarlSim::CsNeuronGroup::SetData(), and StdUtils::Std_CheckString().
|
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.
Reimplemented from AnimatCarlSim::CsNeuronGroup.
Definition at line 94 of file CsSpikeGeneratorGroup.cpp.