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

A minimal example for simulating a single AdEx neuron with excitatory Poisson input. More...

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

Functions

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

Detailed Description

A minimal example for simulating a single AdEx neuron with excitatory Poisson input.

This is the code for the Tutorial 1. The tutorials can be found at http://www.fzenke.net/auryn/doku.php?id=tutorials:tutorial_1

Function Documentation

◆ main()

int main ( int  ac,
char *  av[] 
)
35 {
36  // Initialize Auryn kernel
37  auryn_init( ac, av );
38 
39  // Set master random seed
40  sys->set_master_seed(102);
41 
42  // Initialize Poisson input population (PoissonGroup)
43  int nb_input_neurons = 100;
44  float poisson_rate = 5.0;
45  PoissonGroup * poisson = new PoissonGroup(nb_input_neurons,poisson_rate);
46 
47  // Initialize receiving population with one neuron
48  AdExGroup * neuron = new AdExGroup(1);
49 
50  // Connect input and the AdEx neuron
51  float weight = 0.2; // conductance amplitude in units of leak conductance
52  AllToAllConnection * con = new AllToAllConnection(poisson,neuron,weight);
53  con->set_transmitter(GLUT); // Make this an excitatory connection
54 
55  // Initialize monitors which record information to file
56  //
57  // Record input and output spikes
58  SpikeMonitor * input_spike_mon = new SpikeMonitor( poisson, sys->fn("input","ras") );
59  SpikeMonitor * output_spike_mon = new SpikeMonitor( neuron, sys->fn("output","ras") );
60 
61  // Record membrane voltage of AdEx neuron
62  VoltageMonitor * output_voltage_mon = new VoltageMonitor( neuron, 0, sys->fn("output","mem") );
63 
64  // Run the simulation for 2 seconds
65  sys->run(2);
66 
67  // Shut down Auryn kernel
68  auryn_free();
69 }
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Provides all to all connectivity.
Definition: AllToAllConnection.h:47
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
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
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 set_master_seed(unsigned int seed=123)
Set master seed.
Definition: System.cpp:1014
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
string fn(std::string extension)
Format output file name.
Definition: System.cpp:689
void set_transmitter(AurynStateVector *ptr)
Same as set_target.
Here is the call graph for this function: