Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Functions
sim_2comp_input.cpp File Reference
#include "auryn.h"
Include dependency graph for sim_2comp_input.cpp:

Functions

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

Function Documentation

◆ main()

int main ( int  ac,
char *  av[] 
)
28 {
29  int errcode = 0;
30  char strbuf [255];
31  string simname = "nbg";
32  auryn_init( ac, av, ".", simname );
33 
34  // define neuron group
35  NaudGroup * neurons_exc = new NaudGroup(40);
36  IFGroup * neurons_inh = new IFGroup(10);
37 
38  // define input group
39  PoissonGroup * poisson_exc = new PoissonGroup(40, 5);
40 
41  // connect
42  const double we = 1.0;
43  const double wi = 1.0;
44  const double sparseness = 0.5;
45  SparseConnection * con_ext_exc = new SparseConnection(poisson_exc, neurons_exc, we, sparseness);
46  con_ext_exc->set_target("g_ampa_dend");
47  SparseConnection * con_exc_inh = new SparseConnection(neurons_exc, neurons_inh, we, sparseness);
48  SparseConnection * con_inh_exc = new SparseConnection(neurons_inh, neurons_exc, wi, sparseness, GABA);
49  con_inh_exc->set_target("g_gaba_dend");
50 
51  // define monitors
52  VoltageMonitor * vmon = new VoltageMonitor( neurons_exc, 0, sys->fn("mem") );
53  SpikeMonitor * smon = new SpikeMonitor( neurons_exc, sys->fn("ras") );
54  StateMonitor * smon_vd = new StateMonitor( neurons_exc, 0, "Vd", sys->fn("Vd") );
55  StateMonitor * smon_m = new StateMonitor( neurons_exc, 0, "thr", sys->fn("thr") );
56  StateMonitor * smon_ws = new StateMonitor( neurons_exc, 0, "wsoma", sys->fn("wsoma") );
57  StateMonitor * smon_wd = new StateMonitor( neurons_exc, 0, "wdend", sys->fn("wdend") );
58 
59  // run simulation
60  logger->msg("Running ...",PROGRESS);
61 
62  const double simtime = 2;
63  // simulate
64  sys->run(simtime);
65 
66  if (errcode)
67  auryn_abort(errcode);
68 
69  logger->msg("Freeing ...",PROGRESS,true);
70  auryn_free();
71  return errcode;
72 }
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
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
This file implements NaudGroup, Richard Naud's reduced two compartment model with active dendrites...
Definition: NaudGroup.h:50
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
void set_target(AurynWeight *ptr)
Sets target state of this connection directly via a pointer.
Definition: Connection.cpp:137
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: