Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Macros | Functions
sim_delay_connection.cpp File Reference

Example simulation illustrating the effect of delay connection. More...

#include "auryn.h"
Include dependency graph for sim_delay_connection.cpp:

Macros

#define N   1
 

Functions

int main (int ac, char *av[])
 

Detailed Description

Example simulation illustrating the effect of delay connection.

The simulation sets up a single input neuron and connects it to a single output neuron via a SparseConnection (which only has the axonal delay from IFGroup) and via a DelayConnection which has both the axonal delay plus an added 10ms dendritic delay. The latter connection is GABAergic to make it easily differntiable in the membrane trace.

Macro Definition Documentation

◆ N

#define N   1

Function Documentation

◆ main()

int main ( int  ac,
char *  av[] 
)
38 {
39 
40  int errcode = 0;
41  string simname = "delay_connection";
42  string logfile = simname;
43  string tmpstr;
44  AurynWeight w = 1.0;
45 
46  // BEGIN Global definitions
47  auryn_init( ac, av );
48  sys->set_simulation_name(simname);
49  // END Global definitions
50 
51  // define input group
52  PoissonGroup * poisson = new PoissonGroup(N,1.);
53 
54  // define receiving group
55  IFGroup * neuron = new IFGroup(1);
56 
57  // define connections
58  SparseConnection * con = new SparseConnection(poisson, neuron, w, 1.0, GLUT);
59  DelayConnection * dly_con = new DelayConnection(poisson, neuron, w, 1.0, GABA);
60  dly_con->set_delay(10e-3); // 10ms delay added
61 
62  // define monitors
63  SpikeMonitor * smon = new SpikeMonitor( neuron, sys->fn("ras") );
64  VoltageMonitor * vmon = new VoltageMonitor( neuron, 0, sys->fn("mem"), 1e-3 );
65  StateMonitor * amon = new StateMonitor( neuron, 0, "g_ampa", sys->fn("ampa") );
66  StateMonitor * nmon = new StateMonitor( neuron, 0, "g_gaba", sys->fn("gaba") );
67 
68  // run simulation
69  logger->msg("Running ...",PROGRESS);
70  sys->run(10);
71 
72  if (errcode)
73  auryn_abort(errcode);
74 
75  logger->msg("Freeing ...",PROGRESS,true);
76  auryn_free();
77  return errcode;
78 }
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
void set_delay(double delay=1e-3)
Sets the delay in in units of seconds which is added to all spikes from the src group.
Definition: DelayConnection.cpp:94
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
The base class to create sparse random connections.
Definition: SparseConnection.h:66
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
void set_simulation_name(std::string name)
Sets the simulation name.
Definition: System.cpp:654
The standard Monitor object to record spikes from a SpikingGroup and write them to a text file...
Definition: SpikeMonitor.h:52
#define N
Definition: sim_delay_connection.cpp:23
void auryn_abort(int errcode)
Terminates Auryn simulation abnormally.
Definition: auryn_global.cpp:113
System * sys
Global pointer to instance of System which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:37
A SpikingGroup that creates poissonian spikes with a given rate.
Definition: PoissonGroup.h:52
Records the membrane potential from one unit from the source neuron group to a file.
Definition: VoltageMonitor.h:48
void auryn_init(int ac, char *av[], string dir, string simulation_name, string logfile_prefix, LogMessageType filelog_level, LogMessageType consolelog_level)
Initalizes MPI and the Auryn simulation environment.
Definition: auryn_global.cpp:84
Standard Gabaergic (inhibitory) transmission.
Definition: auryn_definitions.h:140
void msg(std::string text, LogMessageType type=NOTIFICATION, bool global=false, int line=-1, std::string srcfile="")
Definition: Logger.cpp:74
DelayConnection implements a SparseConnection with adjustable delays.
Definition: DelayConnection.h:60
Definition: Logger.h:41
string fn(std::string extension)
Format output file name.
Definition: System.cpp:689
Records from an arbitray state vector of one unit from the source SpikingGroup to a file...
Definition: StateMonitor.h:40
Implements the standard integrate and file model used in Auryn.
Definition: IFGroup.h:47
Here is the call graph for this function: