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

Simulates exc and inh Poisson inputs to a small population of AdEx neurons and records their membrane potentials. More...

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

Functions

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

Detailed Description

Simulates exc and inh Poisson inputs to a small population of AdEx neurons and records their membrane potentials.

Function Documentation

◆ main()

int main ( int  ac,
char *  av[] 
)
34 {
35 
36  int errcode = 0;
37  char strbuf [255];
38  string simname = "poisson_input";
39  auryn_init( ac, av, ".", simname );
40 
41  // define neuron group
42  const int size_output = 10;
43  AdExGroup* neurons = new AdExGroup(size_output);
44  // alternatively you can also use an
45  // IzhikevichGroup * neurons = new IzhikevichGroup(1);
46 
47  // define Poisson input group
48  PoissonGroup * poisson_exc = new PoissonGroup(800, 10);
49  PoissonGroup * poisson_inh = new PoissonGroup(200, 10);
50 
51  // connect sparsely
52  const double weight = 0.2;
53  const double sparseness = 0.1;
54  SparseConnection * con_exc = new SparseConnection( poisson_exc, neurons, weight, sparseness );
55  SparseConnection * con_inh = new SparseConnection( poisson_inh, neurons, weight, sparseness, GABA);
56 
57  // define monitors
58  SpikeMonitor * smon = new SpikeMonitor( neurons, sys->fn("ras") );
59  for ( int i = 0 ; i < size_output ; ++i ) {
60  VoltageMonitor * vmon = new VoltageMonitor( neurons, i, sys->fn("neurons",i,"mem") );
61  }
62 
63  // run simulation
64  logger->msg("Running ...",PROGRESS);
65 
66  const double simtime = 1.0;
67  // simulate
68  sys->run(simtime);
69 
70  if (errcode)
71  auryn_abort(errcode);
72 
73  logger->msg("Freeing ...",PROGRESS,true);
74  auryn_free();
75  return errcode;
76 }
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
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
The standard Monitor object to record spikes from a SpikingGroup and write them to a text file...
Definition: SpikeMonitor.h:52
Conductance based Adaptive Exponential neuron model - Brette and Gerstner (2005). ...
Definition: AdExGroup.h:46
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
Definition: Logger.h:41
string fn(std::string extension)
Format output file name.
Definition: System.cpp:689
Here is the call graph for this function: