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

Example simulation which simulates one Poisson input onto a single postsynaptic neuron and records the membrane potential. More...

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

Macros

#define N   1
 

Functions

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

Detailed Description

Example simulation which simulates one Poisson input onto a single postsynaptic neuron and records the membrane potential.

Macro Definition Documentation

◆ N

#define N   1

Function Documentation

◆ main()

int main ( int  ac,
char *  av[] 
)
35 {
36 
37  int errcode = 0;
38  string simname = "out_epsp";
39  string logfile = simname;
40  string tmpstr;
41  AurynWeight w = 1.0;
42 
43  // BEGIN Global definitions
44  auryn_init( ac, av );
45  sys->set_simulation_name(simname);
46  // END Global definitions
47 
48  // define input group
49  PoissonGroup * poisson = new PoissonGroup(N,1.);
50 
51  // define receiving group
52  IafPscExpGroup * neuron = new IafPscExpGroup(1);
53 
54  // define connection
55  IdentityConnection * con = new IdentityConnection(poisson,neuron,w,GLUT);
56 
57  // define monitors
58  SpikeMonitor * smon = new SpikeMonitor( neuron, sys->fn("ras") );
59  VoltageMonitor * vmon = new VoltageMonitor( neuron, 0, sys->fn("mem"), 1e-3 );
60  StateMonitor * amon = new StateMonitor( neuron, 0, "g_ampa", sys->fn("ampa") );
61  StateMonitor * nmon = new StateMonitor( neuron, 0, "g_nmda", sys->fn("nmda") );
62 
63  // run simulation
64  logger->msg("Running ...",PROGRESS);
65  sys->run(10);
66 
67  if (errcode)
68  auryn_abort(errcode);
69 
70  logger->msg("Freeing ...",PROGRESS,true);
71  auryn_free();
72  return errcode;
73 }
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
Simple LIF neuron model with absolute refractoriness and current based synapses.
Definition: IafPscExpGroup.h:45
#define N
Definition: sim_test.cpp:23
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
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
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
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
Records from an arbitray state vector of one unit from the source SpikingGroup to a file...
Definition: StateMonitor.h:40
Provides a unity matrix like connectivity.
Definition: IdentityConnection.h:47
Here is the call graph for this function: