Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Macros | Functions
sim_epsp_binmon.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_epsp_binmon.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  char strbuf [255];
39  string simname = "out_epsp";
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  IFGroup * neuron = new IFGroup(1);
53 
54  // define connection
55  IdentityConnection * con = new IdentityConnection(poisson,neuron,w,GLUT);
56 
57  // define monitors
58  BinaryStateMonitor * stmon = new BinaryStateMonitor( neuron, 0, "mem", sys->fn("bmem"), 1e-3 );
59  BinaryStateMonitor * amon = new BinaryStateMonitor( neuron, 0, "g_ampa", sys->fn("bampa") );
60  BinaryStateMonitor * nmon = new BinaryStateMonitor( neuron, 0, "g_nmda", sys->fn("bnmda") );
61 
62  // run simulation
63  logger->msg("Running ...",PROGRESS);
64  sys->run(10);
65 
66  if (errcode)
67  auryn_abort(errcode);
68  return errcode;
69 
70  logger->msg("Freeing ...",PROGRESS,true);
71  auryn_free();
72 }
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
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
Records from an arbitray state vector of one unit from the source SpikingGroup to a binary file...
Definition: BinaryStateMonitor.h:42
void auryn_abort(int errcode)
Terminates Auryn simulation abnormally.
Definition: auryn_global.cpp:113
#define N
Definition: sim_epsp_binmon.cpp:23
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
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
Implements the standard integrate and file model used in Auryn.
Definition: IFGroup.h:47
Provides a unity matrix like connectivity.
Definition: IdentityConnection.h:47
Here is the call graph for this function: