CARLsim
6.1.0
CARLsim: a GPU-accelerated SNN simulator
|
Contains all of CARLsim's core functionality. More...
#include <snn.h>
Public Member Functions | |
SNN (const std::string &name, SimMode preferredSimMode, LoggerMode loggerMode, int randSeed) | |
SNN Constructor. More... | |
~SNN () | |
SNN Destructor. More... | |
void | biasWeights (short int connId, float bias, bool updateWeightRange=false) |
short int | connect (int gIDpre, int gIDpost, const std::string &_type, float initWt, float maxWt, float prob, uint8_t minDelay, uint8_t maxDelay, RadiusRF radius, float mulSynFast, float mulSynSlow, bool synWtType) |
make from each neuron in grpId1 to 'numPostSynapses' neurons in grpId2 More... | |
short int | connect (int gIDpre, int gIDpost, ConnectionGeneratorCore *conn, float mulSynFast, float mulSynSlow, bool synWtType) |
short int | connectCompartments (int grpIdLower, int grpIdUpper) |
int | createGroup (const std::string &grpName, const Grid3D &grid, int neurType, int preferredPartition, ComputingBackend preferredBackend) |
Creates a group of Izhikevich spiking neurons. More... | |
int | createGroupLIF (const std::string &grpName, const Grid3D &grid, int neurType, int preferredPartition, ComputingBackend preferredBackend) |
Creates a group of LIF spiking neurons. More... | |
int | createSpikeGeneratorGroup (const std::string &grpName, const Grid3D &grid, int neurType, int preferredPartition, ComputingBackend preferredBackend) |
Creates a spike generator group (dummy-neurons, not Izhikevich spiking neurons) More... | |
void | exitSimulation (int val=1) |
deallocates all dynamical structures and exits More... | |
void | findWavefrontPath (std::vector< int > &path, std::vector< float > &eligibility, int netId, int grpId, int startNId, int goalNId) |
std::vector< float > | getConductanceAMPA (int grpId) |
void | getConductanceConfig (int grpId, float &dAMPA, float &rNMDA, float &dNMDA, float &dGABAa, float &rGABAb, float &dGABAb) |
void | getConductanceConfig (int grpId, int &tdAMPA, int &trNMDA, int &tdNMDA, int &tdGABAa, int &trGABAb, int &tdGABAb) |
std::vector< float > | getConductanceGABAa (int grpId) |
std::vector< float > | getConductanceGABAb (int grpId) |
std::vector< float > | getConductanceNMDA (int grpId) |
ConnectConfig | getConnectConfig (short int connectId) |
required for homeostasis More... | |
short int | getConnectId (int grpIdPre, int grpIdPost) |
find connection ID based on pre-post group pair, O(N) More... | |
ConnSTDPInfo | getConnSTDPInfo (short int connId) |
float * | getCurrent () |
temporary getter to return pointer to current[] More... | |
RangeDelay | getDelayRange (short int connId) |
returns the RangeDelay struct of a connection More... | |
uint8_t * | getDelays (int gGrpIdPre, int gGrpIdPost, int &numPreN, int &numPostN) |
Returns the delay information for all synaptic connections between a pre-synaptic and a post-synaptic neuron group. More... | |
int | getGroupEndNeuronId (int gGrpId) |
Grid3D | getGroupGrid3D (int grpId) |
int | getGroupId (std::string grpName) |
std::string | getGroupName (int grpId) |
GroupNeuromodulatorInfo | getGroupNeuromodulatorInfo (int grpId) |
int | getGroupNumNeurons (int gGrpId) |
int | getGroupStartNeuronId (int gGrpId) |
IcalcType | getIcalcType (int grpId) |
const FILE * | getLogFpDeb () |
returns file pointer to debug log More... | |
const FILE * | getLogFpErr () |
returns file pointer to error log More... | |
const FILE * | getLogFpInf () |
function writes population weights from gIDpre to gIDpost to file fname in binary. More... | |
const FILE * | getLogFpLog () |
returns file pointer to log file More... | |
LoggerMode | getLoggerMode () |
std::string | getNetworkName () |
int | getNeuronId (int gGrpId, Point3D location) |
the inverse of getNeuronLocation3D More... | |
Point3D | getNeuronLocation3D (int neurId) |
Point3D | getNeuronLocation3D (int grpId, int relNeurId) |
NeuronMonitor * | getNeuronMonitor (int grpId) |
Returns pointer to existing NeuronMonitor object, NULL else. More... | |
NeuronMonitorCore * | getNeuronMonitorCore (int grpId) |
int | getNumCompartmentConnections () |
int | getNumConnections () |
int | getNumGroups () |
int | getNumNeurons () |
int | getNumNeuronsGen () |
int | getNumNeuronsGenExc () |
int | getNumNeuronsGenInh () |
int | getNumNeuronsReg () |
int | getNumNeuronsRegExc () |
int | getNumNeuronsRegInh () |
int | getNumSynapses () |
int | getNumSynapticConnections (short int connectionId) |
gets number of connections associated with a connection ID More... | |
int | getRandSeed () |
double | getRFDist3D (const RadiusRF &radius, const Point3D &pre, const Point3D &post) |
checks whether a point pre lies in the receptive field for point post More... | |
int | getSimTime () |
int | getSimTimeMs () |
int | getSimTimeSec () |
SpikeMonitor * | getSpikeMonitor (int grpId) |
Returns pointer to existing SpikeMonitor object, NULL else. More... | |
SpikeMonitorCore * | getSpikeMonitorCore (int grpId) |
float * | getSTPu () |
temporary getter to return pointer to stpu[] More... | |
float * | getSTPx () |
temporary getter to return pointer to stpx[] More... | |
std::vector< std::vector< float > > | getWeightMatrix2D (short int connId) |
RangeWeight | getWeightRange (short int connId) |
returns RangeWeight struct of a connection More... | |
bool | isConnectionPlastic (short int connId) |
returns whether synapses in connection are fixed (false) or plastic (true) More... | |
bool | isDopaminergicGroup (int gGrpId) |
bool | isExcitatoryGroup (int gGrpId) |
bool | isGroupWith (int grpId, IcalcType icalcType) |
bool | isGroupWithCOBA (int grpId) |
bool | isGroupWithCUBA (int grpId) |
bool | isGroupWithGABAbRise (int grpId) |
bool | isGroupWithHomeostasis (int grpId) |
returns whether group has homeostasis enabled (true) or not (false) More... | |
bool | isGroupWithNMDARise (int grpId) |
bool | isInhibitoryGroup (int gGrpId) |
bool | isPoint3DinRF (const RadiusRF &radius, const Point3D &pre, const Point3D &post) |
bool | isPoissonGroup (int gGrpId) |
bool | isSimulationWithCOBA () |
bool | isSimulationWithCompartments () |
bool | isSimulationWithCUBA () |
bool | isSimulationWithFixedWeightsOnly () |
bool | isSimulationWithGABAbRise () |
bool | isSimulationWithHomeostasis () |
bool | isSimulationWithNMDARise () |
bool | isSimulationWithPlasticWeights () |
bool | isSimulationWithSTDP () |
bool | isSimulationWithSTP () |
void | loadSimulation (FILE *fid) |
void | printEntrails (char *buffer, unsigned length, int gGrpIdPre, int gGrpIdPost) |
int | runNetwork (int _nsec, int _nmsec, bool printRunSummary) |
run the simulation for n sec More... | |
void | saveSimulation (FILE *fid, bool saveSynapseInfo=false) |
stores the pre and post synaptic neuron ids with the weight and delay More... | |
void | scaleWeights (short int connId, float scale, bool updateWeightRange=false) |
void | setCompartmentParameters (int grpId, float couplingUp, float couplingDown) |
Coupling constants for the compartment are set using this method. More... | |
void | setConductances (bool isSet, int tdAMPA, int trNMDA, int tdNMDA, int tdGABAa, int trGABAb, int tdGABAb) |
Sets custom values for conductance decay () or disables conductances alltogether These will be applied to all connections in a network For details on the ODE that is implemented refer to (Izhikevich et al, 2004), and for suitable values see (Dayan & Abbott, 2001). More... | |
void | setConductances (int grpId, bool isSet, int tdAMPA, int trNMDA, int tdNMDA, int tdGABAa, int trGABAb, int tdGABAb) |
void | setConnectionModulation (int preGrpId, int postGrpId, IcalcType icalcType) |
ConnectionMonitor * | setConnectionMonitor (int grpIdPre, int grpIdPost, FILE *fid) |
sets up a network monitor registered with a callback to process the spikes. More... | |
void | setESTDP (int preGrpId, int postGrpId, bool isSet, STDPType type, STDPCurve curve, float alphaPlus, float tauPlus, float alphaMinus, float tauMinus, float gamma) |
Set the spike-timing-dependent plasticity (STDP) for a neuron group. More... | |
void | setESTDP (int preGrpId, int postGrpId, bool isSet, STDPType type, STDPCurve curve, float alphaPlus, float tauPlus, float alphaMinus, float tauMinus, int nm_pka, float w_pka, int nm_plc, float w_plc) |
Set the spike-timing-dependent plasticity (STDP) for a connection group. More... | |
void | setExternalCurrent (int grpId, const std::vector< float > ¤t) |
injects current (mA) into the soma of every neuron in the group More... | |
GroupMonitor * | setGroupMonitor (int grpId, FILE *fid, int mode=0) |
sets up a group monitor registered with a callback to process the spikes. More... | |
void | setHomeoBaseFiringRate (int groupId, float baseFiring, float baseFiringSD) |
Sets homeostatic target firing rate (enforced through homeostatic synaptic scaling) More... | |
void | setHomeostasis (int grpId, bool isSet, float homeoScale, float avgTimeScale) |
Sets the homeostasis parameters. g is the grpID, enable=true(false) enables(disables) homeostasis, homeostasisScale is strength of homeostasis compared to the strength of normal LTP/LTD from STDP (which is 1), and avgTimeScale is the time frame over which the average firing rate is averaged (it should be larger in scale than STDP timescales). More... | |
void | setIntegrationMethod (integrationMethod_t method, int numStepsPerMs) |
Sets the integration method and the number of integration steps per 1ms simulation time step. More... | |
void | setISTDP (int preGrpId, int postGrpId, bool isSet, STDPType type, STDPCurve curve, float ab1, float ab2, float tau1, float tau2) |
Set the inhibitory spike-timing-dependent plasticity (STDP) with anti-hebbian curve for a neuron group. More... | |
void | setLogsFp (FILE *fpInf=NULL, FILE *fpErr=NULL, FILE *fpDeb=NULL, FILE *fpLog=NULL) |
Sets the file pointers for all log files file pointer NULL means don't change it. More... | |
void | setNeuromodulator (int grpId, float baseDP, float tauDP, float base5HT, float tau5HT, float baseACh, float tauACh, float baseNE, float tauNE) |
Sets baseline concentration and decay time constant of neuromodulators (DP, 5HT, ACh, NE) for a neuron group. More... | |
void | setNeuromodulator (int grpId, float baseDP, float tauDP, float releaseDP, bool activeDP, float base5HT, float tau5HT, float release5HT, bool active5HT, float baseACh, float tauACh, float releaseAch, bool activeACh, float baseNE, float tauNE, float releaseNE, bool activeNE) |
New config. More... | |
NeuronMonitor * | setNeuronMonitor (int gid, FILE *fid) |
sets up a neuron monitor registered with a callback to process the neuron state values, there can only be one NeuronMonitor per group More... | |
void | setNeuronParameters (int grpId, float izh_a, float izh_a_sd, float izh_b, float izh_b_sd, float izh_c, float izh_c_sd, float izh_d, float izh_d_sd) |
Sets the Izhikevich parameters a, b, c, and d of a neuron group. More... | |
void | setNeuronParameters (int grpId, float izh_C, float izh_C_sd, float izh_k, float izh_k_sd, float izh_vr, float izh_vr_sd, float izh_vt, float izh_vt_sd, float izh_a, float izh_a_sd, float izh_b, float izh_b_sd, float izh_vpeak, float izh_vpeak_sd, float izh_c, float izh_c_sd, float izh_d, float izh_d_sd) |
Sets the Izhikevich parameters C, k, vr, vt, a, b, vpeak, c, and d of a neuron group. More... | |
void | setNeuronParametersLIF (int grpId, int tau_m, int tau_ref, float vTh, float vReset, double minRmem, double maxRmem) |
Sets neuron parameters for a group of LIF spiking neurons. More... | |
void | setNM4STP (int grpId, float wSTP_U[], float wSTP_tau_u[], float wSTP_tau_x[]) |
void | setNM4weighted (int grpId, IcalcType type, float wDA, float w5HT, float wACh, float wNE, float wNorm, float wBase) |
void | setSpikeGenerator (int grpId, SpikeGeneratorCore *spikeGenFunc) |
sets up a spike generator More... | |
SpikeMonitor * | setSpikeMonitor (int gid, FILE *fid) |
sets up a spike monitor registered with a callback to process the spikes, there can only be one SpikeMonitor per group More... | |
void | setSpikeRate (int grpId, PoissonRate *spikeRate, int refPeriod) |
Sets the Poisson spike rate for a group. For information on how to set up spikeRate, see Section Poisson spike generators in the Tutorial. More... | |
void | setSTP (int grpId, bool isSet, float STP_U, float STP_tau_u, float STP_tau_x) |
Sets STP params U, tau_u, and tau_x of a neuron group (pre-synaptically) CARLsim implements the short-term plasticity model of (Tsodyks & Markram, 1998; Mongillo, Barak, & Tsodyks, 2008) du/dt = -u/STP_tau_u + STP_U * (1-u-) * (t-t_spk) dx/dt = (1-x)/STP_tau_x - u+ * x- * (t-t_spk) dI/dt = -I/tau_S + A * u+ * x- * (t-t_spk) where u- means value of variable u right before spike update, and x+ means value of variable x right after the spike update, and A is the synaptic weight. The STD effect is modeled by a normalized variable (0<=x<=1), denoting the fraction of resources that remain available after neurotransmitter depletion. The STF effect is modeled by a utilization parameter u, representing the fraction of available resources ready for use (release probability). Following a spike, (i) u increases due to spike-induced calcium influx to the presynaptic terminal, after which (ii) a fraction u of available resources is consumed to produce the post-synaptic current. Between spikes, u decays back to zero with time constant STP_tau_u (), and x recovers to value one with time constant STP_tau_x (). More... | |
void | setupNetwork () |
build the network More... | |
void | setWeight (short int connId, int neurIdPre, int neurIdPost, float weight, bool updateWeightRange=false) |
sets the weight value of a specific synapse More... | |
void | setWeightAndWeightChangeUpdate (UpdateInterval wtANDwtChangeUpdateInterval, bool enableWtChangeDecay, float wtChangeDecay) |
Sets the weight and weight change update parameters. More... | |
void | startTesting (bool shallUpdateWeights=true) |
enters a testing phase, where all weight updates are disabled More... | |
void | stopTesting () |
exits a testing phase, making weight updates possible again More... | |
void | updateConnectionMonitor (short int connId=ALL) |
polls connection weights More... | |
bool | updateDelays (int gGrpIdPre, int gGrpIdPost, std::vector< std::tuple< int, int, uint8_t >> connDelays) |
void | updateGroupMonitor (int grpId=ALL) |
access group status (currently the concentration of neuromodulator) More... | |
void | updateNeuronMonitor (int grpId=ALL) |
copy required neuron state values from ??? buffer to ??? buffer More... | |
void | updateSpikeMonitor (int grpId=ALL) |
copy required spikes from firing buffer to spike buffer More... | |
Static Public Member Functions | |
static int | cudaDeviceCount () |
Get Info of suitable Harware for integration of CARLsim in NeuroInf-IDEs NIIDEs (LN20201017) More... | |
static void | cudaDeviceDescription (unsigned ithGPU, const char **desc) |
Static Public Attributes | |
static const unsigned int | MAJOR_VERSION = 6 |
major release version, as in CARLsim X More... | |
static const unsigned int | MINOR_VERSION = 0 |
minor release version, as in CARLsim 2.X More... | |
**************************************************************************************************************** /// CPUSNN CORE CLASS **************************************************************************************************************** ///
This is a more elaborate description of our main class.
SNN | ( | const std::string & | name, |
SimMode | preferredSimMode, | ||
LoggerMode | loggerMode, | ||
int | randSeed | ||
) |
**************************************************************************************************************** /// PUBLIC METHODS **************************************************************************************************************** ///
name | the symbolic name of a spiking neural network |
loggerMode | log mode |
randSeed | randomize seed of the random number generator |
**************************************************************************************************************** /// CONSTRUCTOR / DESTRUCTOR **************************************************************************************************************** ///
Definition at line 78 of file snn_manager.cpp.
~SNN | ( | ) |
clean up all allocated resource
Definition at line 87 of file snn_manager.cpp.
void biasWeights | ( | short int | connId, |
float | bias, | ||
bool | updateWeightRange = false |
||
) |
************************************************************************************************************ /// PUBLIC METHODS: INTERACTING WITH A SIMULATION ************************************************************************************************************ ///
Definition at line 1228 of file snn_manager.cpp.
short int connect | ( | int | grpId1, |
int | grpId2, | ||
const std::string & | _type, | ||
float | initWt, | ||
float | maxWt, | ||
float | prob, | ||
uint8_t | minDelay, | ||
uint8_t | maxDelay, | ||
RadiusRF | radius, | ||
float | _mulSynFast, | ||
float | _mulSynSlow, | ||
bool | synWtType | ||
) |
Creates synaptic projections from a pre-synaptic group to a post-synaptic group using a pre-defined primitive type.
grpIdPre | ID of the pre-synaptic group |
grpIdPost | ID of the post-synaptic group |
connType | connection type. "random": random connectivity. "one-to-one": connect the i-th neuron in pre to the i-th neuron in post. "full": connect all neurons in pre to all neurons in post (no self-connections). |
initWt | initial weight strength (arbitrary units); should be negative for inhibitory connections |
maxWt | upper bound on weight strength (arbitrary units); should be negative for inhibitory connections |
connProb | connection probability |
minDelay | the minimum delay allowed (ms) |
maxdelay | the maximum delay allowed (ms) |
synWtType | (optional) connection type, either SYN_FIXED or SYN_PLASTIC, default = SYN_FIXED. |
wtType | (optional) DEPRECATED |
************************************************************************************************************ /// PUBLIC METHODS: SETTING UP A SIMULATION ************************************************************************************************************ ///
Definition at line 97 of file snn_manager.cpp.
short int connect | ( | int | gIDpre, |
int | gIDpost, | ||
ConnectionGeneratorCore * | conn, | ||
float | mulSynFast, | ||
float | mulSynSlow, | ||
bool | synWtType | ||
) |
Definition at line 179 of file snn_manager.cpp.
short int connectCompartments | ( | int | grpIdLower, |
int | grpIdUpper | ||
) |
Definition at line 221 of file snn_manager.cpp.
int createGroup | ( | const std::string & | grpName, |
const Grid3D & | grid, | ||
int | neurType, | ||
int | preferredPartition, | ||
ComputingBackend | preferredBackend | ||
) |
name | the symbolic name of a group |
grid | Grid3D struct to create neurons on a 3D grid (x,y,z) |
nType | the type of neuron |
Definition at line 256 of file snn_manager.cpp.
int createGroupLIF | ( | const std::string & | grpName, |
const Grid3D & | grid, | ||
int | neurType, | ||
int | preferredPartition, | ||
ComputingBackend | preferredBackend | ||
) |
grpName | the symbolic name of a group |
grid | Grid3D struct to create neurons on a 3D grid (x,y,z) |
neurType | the type of neuron |
preferredPartition | defines the desired runtime partition for the group |
preferredBackend | defines whether the group will be placed on CPU or GPU |
Definition at line 313 of file snn_manager.cpp.
int createSpikeGeneratorGroup | ( | const std::string & | grpName, |
const Grid3D & | grid, | ||
int | neurType, | ||
int | preferredPartition, | ||
ComputingBackend | preferredBackend | ||
) |
name | the symbolic name of a group |
grid | Grid3D struct to create neurons on a 3D grid (x,y,z) |
nType | the type of neuron, currently only support EXCITATORY NEURON |
Definition at line 366 of file snn_manager.cpp.
|
static |
|
static |
void exitSimulation | ( | int | val = 1 | ) |
void findWavefrontPath | ( | std::vector< int > & | path, |
std::vector< float > & | eligibility, | ||
int | netId, | ||
int | grpId, | ||
int | startNId, | ||
int | goalNId | ||
) |
std::vector< float > getConductanceAMPA | ( | int | grpId | ) |
Definition at line 2064 of file snn_manager.cpp.
|
inline |
|
inline |
std::vector< float > getConductanceGABAa | ( | int | grpId | ) |
Definition at line 2105 of file snn_manager.cpp.
std::vector< float > getConductanceGABAb | ( | int | grpId | ) |
Definition at line 2118 of file snn_manager.cpp.
std::vector< float > getConductanceNMDA | ( | int | grpId | ) |
Definition at line 2077 of file snn_manager.cpp.
ConnectConfig getConnectConfig | ( | short int | connectId | ) |
short int getConnectId | ( | int | grpIdPre, |
int | grpIdPost | ||
) |
**************************************************************************************************************** /// GETTERS / SETTERS **************************************************************************************************************** ///
Definition at line 2040 of file snn_manager.cpp.
ConnSTDPInfo getConnSTDPInfo | ( | short int | connId | ) |
|
inline |
Definition at line 686 of file snn.h.
RangeDelay getDelayRange | ( | short int | connId | ) |
uint8_t * getDelays | ( | int | gGrpIdPre, |
int | gGrpIdPost, | ||
int & | numPreN, | ||
int & | numPostN | ||
) |
gGrpIdPre | ID of pre-synaptic group |
gGrpIdPost | ID of post-synaptic group |
numPreN | return the number of pre-synaptic neurons |
numPostN | retrun the number of post-synaptic neurons |
delays | (optional) return the delay information for all synapses, default = NULL |
Definition at line 2154 of file snn_manager.cpp.
|
inline |
Grid3D getGroupGrid3D | ( | int | grpId | ) |
int getGroupId | ( | std::string | grpName | ) |
std::string getGroupName | ( | int | grpId | ) |
GroupNeuromodulatorInfo getGroupNeuromodulatorInfo | ( | int | grpId | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int getNeuronId | ( | int | gGrpId, |
Point3D | location | ||
) |
Definition at line 2315 of file snn_manager.cpp.
Point3D getNeuronLocation3D | ( | int | neurId | ) |
Point3D getNeuronLocation3D | ( | int | grpId, |
int | relNeurId | ||
) |
NeuronMonitor * getNeuronMonitor | ( | int | grpId | ) |
Definition at line 2389 of file snn_manager.cpp.
NeuronMonitorCore * getNeuronMonitorCore | ( | int | grpId | ) |
Returns pointer to existing NeuronMonitorCore object, NULL else. Should not be exposed to user interface
Definition at line 2400 of file snn_manager.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int getNumSynapticConnections | ( | short int | connectionId | ) |
Definition at line 2357 of file snn_manager.cpp.
Definition at line 6111 of file snn_manager.cpp.
|
inline |
|
inline |
|
inline |
SpikeMonitor * getSpikeMonitor | ( | int | grpId | ) |
Definition at line 2368 of file snn_manager.cpp.
SpikeMonitorCore * getSpikeMonitorCore | ( | int | grpId | ) |
Returns pointer to existing SpikeMonitorCore object, NULL else. Should not be exposed to user interface
Definition at line 2378 of file snn_manager.cpp.
|
inline |
|
inline |
Definition at line 699 of file snn.h.
std::vector< std::vector< float > > getWeightMatrix2D | ( | short int | connId | ) |
Definition at line 7499 of file snn_manager.cpp.
RangeWeight getWeightRange | ( | short int | connId | ) |
Definition at line 2411 of file snn_manager.cpp.
bool isConnectionPlastic | ( | short int | connId | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool isGroupWithHomeostasis | ( | int | grpId | ) |
Definition at line 5925 of file snn_manager.cpp.
|
inline |
Definition at line 6102 of file snn_manager.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void loadSimulation | ( | FILE * | fid | ) |
reads the network state from file Reads a CARLsim network file. Such a file can be created using SNN:writeNetwork.
Definition at line 1325 of file snn_manager.cpp.
void printEntrails | ( | char * | buffer, |
unsigned | length, | ||
int | gGrpIdPre, | ||
int | gGrpIdPost | ||
) |
int runNetwork | ( | int | _nsec, |
int | _nmsec, | ||
bool | printRunSummary | ||
) |
[in] | printRunSummary | whether to print a basic summary of the run at the end |
************************************************************************************************************ /// PUBLIC METHODS: RUNNING A SIMULATION ************************************************************************************************************ ///
Definition at line 1103 of file snn_manager.cpp.
void saveSimulation | ( | FILE * | fid, |
bool | saveSynapseInfo = false |
||
) |
Definition at line 1747 of file snn_manager.cpp.
void scaleWeights | ( | short int | connId, |
float | scale, | ||
bool | updateWeightRange = false |
||
) |
void setCompartmentParameters | ( | int | grpId, |
float | couplingUp, | ||
float | couplingDown | ||
) |
grpId | the symbolic name of a group |
couplingUp | the coupling constant for upper connections |
couplingDown | the coupling constant for lower connections |
Definition at line 416 of file snn_manager.cpp.
void setConductances | ( | bool | isSet, |
int | tdAMPA, | ||
int | trNMDA, | ||
int | tdNMDA, | ||
int | tdGABAa, | ||
int | trGABAb, | ||
int | tdGABAb | ||
) |
isSet | enables the use of COBA mode |
tAMPA | time _constant of AMPA decay (ms); for example, 5.0 |
tNMDA | time constant of NMDA decay (ms); for example, 150.0 |
tGABAa | time constant of GABAa decay (ms); for example, 6.0 |
tGABAb | time constant of GABAb decay (ms); for example, 150.0 |
Definition at line 433 of file snn_manager.cpp.
void setConductances | ( | int | grpId, |
bool | isSet, | ||
int | tdAMPA, | ||
int | trNMDA, | ||
int | tdNMDA, | ||
int | tdGABAa, | ||
int | trGABAb, | ||
int | tdGABAb | ||
) |
No default params see above LN 2021
Definition at line 492 of file snn_manager.cpp.
void setConnectionModulation | ( | int | preGrpId, |
int | postGrpId, | ||
IcalcType | icalcType | ||
) |
Definition at line 877 of file snn_manager.cpp.
ConnectionMonitor * setConnectionMonitor | ( | int | grpIdPre, |
int | grpIdPost, | ||
FILE * | fid | ||
) |
[in] | grpIdPre | ID of the pre-synaptic neuron group |
[in] | grpIdPost | ID of the post-synaptic neuron group |
[in] | connectionMon | ConnectionMonitorCore class |
Definition at line 1461 of file snn_manager.cpp.
void setESTDP | ( | int | preGrpId, |
int | postGrpId, | ||
bool | isSet, | ||
STDPType | type, | ||
STDPCurve | curve, | ||
float | alphaPlus, | ||
float | tauPlus, | ||
float | alphaMinus, | ||
float | tauMinus, | ||
float | gamma | ||
) |
Definition at line 782 of file snn_manager.cpp.
void setExternalCurrent | ( | int | grpId, |
const std::vector< float > & | current | ||
) |
Definition at line 1714 of file snn_manager.cpp.
GroupMonitor * setGroupMonitor | ( | int | gGrpId, |
FILE * | fid, | ||
int | mode = 0 |
||
) |
[in] | grpId | ID of the neuron group |
[in] | fid | file pointer for recording group status (neuromodulators) |
[in] | mode | 0=DP, 1=ALL neurotransmitter (LN2020) |
Definition at line 1424 of file snn_manager.cpp.
void setHomeoBaseFiringRate | ( | int | groupId, |
float | baseFiring, | ||
float | baseFiringSD | ||
) |
void setHomeostasis | ( | int | grpId, |
bool | isSet, | ||
float | homeoScale, | ||
float | avgTimeScale | ||
) |
void setIntegrationMethod | ( | integrationMethod_t | method, |
int | numStepsPerMs | ||
) |
void setISTDP | ( | int | preGrpId, |
int | postGrpId, | ||
bool | isSet, | ||
STDPType | type, | ||
STDPCurve | curve, | ||
float | ab1, | ||
float | ab2, | ||
float | tau1, | ||
float | tau2 | ||
) |
Definition at line 890 of file snn_manager.cpp.
void setLogsFp | ( | FILE * | fpInf = NULL , |
FILE * | fpErr = NULL , |
||
FILE * | fpDeb = NULL , |
||
FILE * | fpLog = NULL |
||
) |
************************************************************************************************************ /// PUBLIC METHODS: PLOTTING / LOGGING ************************************************************************************************************ ///
Definition at line 2008 of file snn_manager.cpp.
void setNeuromodulator | ( | int | grpId, |
float | baseDP, | ||
float | tauDP, | ||
float | base5HT, | ||
float | tau5HT, | ||
float | baseACh, | ||
float | tauACh, | ||
float | baseNE, | ||
float | tauNE | ||
) |
groupId | the symbolic name of a group |
baseDP | the baseline concentration of Dopamine |
tauDP | the decay time constant of Dopamine |
base5HT | the baseline concentration of Serotonin |
tau5HT | the decay time constant of Serotonin |
baseACh | the baseline concentration of Acetylcholine |
tauACh | the decay time constant of Acetylcholine |
baseNE | the baseline concentration of Noradrenaline |
tauNE | the decay time constant of Noradrenaline |
Definition at line 727 of file snn_manager.cpp.
void setNeuromodulator | ( | int | grpId, |
float | baseDP, | ||
float | tauDP, | ||
float | releaseDP, | ||
bool | activeDP, | ||
float | base5HT, | ||
float | tau5HT, | ||
float | release5HT, | ||
bool | active5HT, | ||
float | baseACh, | ||
float | tauACh, | ||
float | releaseAch, | ||
bool | activeACh, | ||
float | baseNE, | ||
float | tauNE, | ||
float | releaseNE, | ||
bool | activeNE | ||
) |
NeuronMonitor * setNeuronMonitor | ( | int | gid, |
FILE * | fid | ||
) |
grpId | ID of the neuron group |
neuronMon | (optional) neuronMonitor class |
Definition at line 1558 of file snn_manager.cpp.
void setNeuronParameters | ( | int | grpId, |
float | izh_a, | ||
float | izh_a_sd, | ||
float | izh_b, | ||
float | izh_b_sd, | ||
float | izh_c, | ||
float | izh_c_sd, | ||
float | izh_d, | ||
float | izh_d_sd | ||
) |
Parameter values for each neuron are given by a normal distribution with mean _a, _b, _c, _d and standard deviation _a_sd, _b_sd, _c_sd, and _d_sd, respectively
_groupId | the symbolic name of a group |
_a | the mean value of izhikevich parameter a |
_a_sd | the standard deviation value of izhikevich parameter a |
_b | the mean value of izhikevich parameter b |
_b_sd | the standard deviation value of izhikevich parameter b |
_c | the mean value of izhikevich parameter c |
_c_sd | the standard deviation value of izhikevich parameter c |
_d | the mean value of izhikevich parameter d |
_d_sd | the standard deviation value of izhikevich parameter d |
Definition at line 634 of file snn_manager.cpp.
void setNeuronParameters | ( | int | grpId, |
float | izh_C, | ||
float | izh_C_sd, | ||
float | izh_k, | ||
float | izh_k_sd, | ||
float | izh_vr, | ||
float | izh_vr_sd, | ||
float | izh_vt, | ||
float | izh_vt_sd, | ||
float | izh_a, | ||
float | izh_a_sd, | ||
float | izh_b, | ||
float | izh_b_sd, | ||
float | izh_vpeak, | ||
float | izh_vpeak_sd, | ||
float | izh_c, | ||
float | izh_c_sd, | ||
float | izh_d, | ||
float | izh_d_sd | ||
) |
Parameter values for each neuron are given by a normal distribution with mean _C, _k, _vr, _vt, _a, _b, _vpeak, _c, and _d and standard deviation _C_sd, _k_sd, _vr_sd, _vt_sd, _a_sd, _b_sd, _vpeak_sd, _c_sd, and _d_sd, respectively
_groupId | the symbolic name of a group |
_C | the mean value of izhikevich parameter C |
_C_sd | the standart deviation value of izhikevich parameter C |
_k | the mean value of izhikevich parameter k |
_k_sd | the standart deviation value of izhikevich parameter k |
_vr | the mean value of izhikevich parameter vr |
_vr_sd | the standart deviation value of izhikevich parameter vr |
_vt | the mean value of izhikevich parameter vt |
_vt_sd | the standart deviation value of izhikevich parameter vt |
_a | the mean value of izhikevich parameter a |
_a_sd | the standard deviation value of izhikevich parameter a |
_b | the mean value of izhikevich parameter b |
_b_sd | the standard deviation value of izhikevich parameter b |
_vpeak | the mean value of izhikevich parameter vpeak |
_vpeak_sd | the standart deviation value of izhikevich parameter vpeak |
_c | the mean value of izhikevich parameter c |
_c_sd | the standard deviation value of izhikevich parameter c |
_d | the mean value of izhikevich parameter d |
_d_sd | the standard deviation value of izhikevich parameter d |
Definition at line 659 of file snn_manager.cpp.
void setNeuronParametersLIF | ( | int | grpId, |
int | tau_m, | ||
int | tau_ref, | ||
float | vTh, | ||
float | vReset, | ||
double | minRmem, | ||
double | maxRmem | ||
) |
[in] | grpId | group ID |
[in] | tau_m | Membrane time constant in ms (controls decay/leak) |
[in] | tau_ref | absolute refractory period in ms |
[in] | vTh | Threshold voltage for firing (must be > vReset) |
[in] | vReset | Membrane potential resets to this value immediately after spike |
[in] | minRmem | minimum membrane resistance |
[in] | maxRmem | maximum membrane resistance |
Definition at line 704 of file snn_manager.cpp.
void setNM4STP | ( | int | grpId, |
float | wSTP_U[], | ||
float | wSTP_tau_u[], | ||
float | wSTP_tau_x[] | ||
) |
void setNM4weighted | ( | int | grpId, |
IcalcType | type, | ||
float | wDA, | ||
float | w5HT, | ||
float | wACh, | ||
float | wNE, | ||
float | wNorm, | ||
float | wBase | ||
) |
void setSpikeGenerator | ( | int | gGrpId, |
SpikeGeneratorCore * | spikeGenFunc | ||
) |
Definition at line 1510 of file snn_manager.cpp.
SpikeMonitor * setSpikeMonitor | ( | int | gid, |
FILE * | fid | ||
) |
grpId | ID of the neuron group |
spikeMon | (optional) spikeMonitor class |
Definition at line 1518 of file snn_manager.cpp.
void setSpikeRate | ( | int | gGrpId, |
PoissonRate * | ratePtr, | ||
int | refPeriod | ||
) |
Input arguments:
grpId | ID of the neuron group |
spikeRate | pointer to a PoissonRate instance |
refPeriod | (optional) refractive period, default = 1 |
Definition at line 1607 of file snn_manager.cpp.
void setSTP | ( | int | grpId, |
bool | isSet, | ||
float | STP_U, | ||
float | STP_tau_u, | ||
float | STP_tau_x | ||
) |
[in] | grpId | pre-synaptic group id. STP will apply to all neurons of that group! |
[in] | isSet | a flag whether to enable/disable STP |
[in] | STP_tau_u | decay constant of u () |
[in] | STP_tau_x | decay constant of x () |
Definition at line 946 of file snn_manager.cpp.
void setupNetwork | ( | ) |
[in] | removeTempMemory | remove temp memory after building network |
************************************************************************************************************ /// PUBLIC METHODS: GENERATE A SIMULATION ************************************************************************************************************ ///
Definition at line 1043 of file snn_manager.cpp.
void setWeight | ( | short int | connId, |
int | neurIdPre, | ||
int | neurIdPost, | ||
float | weight, | ||
bool | updateWeightRange = false |
||
) |
Definition at line 1623 of file snn_manager.cpp.
void setWeightAndWeightChangeUpdate | ( | UpdateInterval | wtANDwtChangeUpdateInterval, |
bool | enableWtChangeDecay, | ||
float | wtChangeDecay | ||
) |
[in] | wtANDwtChangeUpdateInterval | the interval between two wt (weight) and wtChange (weight change) update. |
[in] | enableWtChangeDecay | enable weight change decay |
[in] | wtChangeDecay | the decay ratio of weight change (wtChange) |
Definition at line 992 of file snn_manager.cpp.
void startTesting | ( | bool | shallUpdateWeights = true | ) |
void stopTesting | ( | ) |
void updateConnectionMonitor | ( | short int | connId = ALL | ) |
Definition at line 7485 of file snn_manager.cpp.
bool updateDelays | ( | int | gGrpIdPre, |
int | gGrpIdPost, | ||
std::vector< std::tuple< int, int, uint8_t >> | connDelays | ||
) |
void updateGroupMonitor | ( | int | grpId = ALL | ) |
Definition at line 7546 of file snn_manager.cpp.
void updateNeuronMonitor | ( | int | gGrpId = ALL | ) |
This function is public in SNN, but it should probably not be a public user function in CARLsim. It is usually called once every 1000ms by the core to update neuron state value binaries and NeuronMonitor objects. In GPU mode, it will first copy the neuron state info to the host. The input argument can either be a specific group ID or keyword ALL (for all groups). Core and utility functions can call updateNeuronMonitor at any point in time. The function will automatically determine the last time it was called, and update SpikeMonitor information only if necessary.
Definition at line 8256 of file snn_manager.cpp.
void updateSpikeMonitor | ( | int | gGrpId = ALL | ) |
This function is public in SNN, but it should probably not be a public user function in CARLsim. It is usually called once every 1000ms by the core to update spike binaries and SpikeMonitor objects. In GPU mode, it will first copy the firing info to the host. The input argument can either be a specific group ID or keyword ALL (for all groups). Core and utility functions can call updateSpikeMonitor at any point in time. The function will automatically determine the last time it was called, and update SpikeMonitor information only if necessary.
Definition at line 8145 of file snn_manager.cpp.