45 string file_prefix =
"poisson";
50 double simtime = 100.;
54 unsigned int seed = 1;
59 double tau_pre = 20e-3;
60 double tau_post = 20e-3;
66 po::options_description desc(
"Allowed options");
68 (
"help",
"produce help message")
69 (
"dir", po::value<string>(),
"output directory")
70 (
"simtime", po::value<double>(),
"simulation time")
71 (
"eta", po::value<double>(),
"learning rate")
72 (
"winit", po::value<double>(),
"initial weight")
73 (
"kappa", po::value<double>(),
"presynaptic firing rate")
74 (
"nbinputs", po::value<int>(),
"number of Poisson inputs")
75 (
"size", po::value<int>(),
"number of neurons")
76 (
"seed", po::value<int>(),
"random seed")
80 po::store(po::parse_command_line(ac, av, desc), vm);
83 if (vm.count(
"help")) {
84 std::cout << desc <<
"\n";
88 if (vm.count(
"kappa")) {
89 std::cout <<
"kappa set to " 90 << vm[
"kappa"].as<
double>() <<
".\n";
91 kappa = vm[
"kappa"].as<
double>();
94 if (vm.count(
"dir")) {
95 std::cout <<
"dir set to " 96 << vm[
"dir"].as<
string>() <<
".\n";
97 dir = vm[
"dir"].as<
string>();
100 if (vm.count(
"simtime")) {
101 std::cout <<
"simtime set to " 102 << vm[
"simtime"].as<
double>() <<
".\n";
103 simtime = vm[
"simtime"].as<
double>();
106 if (vm.count(
"eta")) {
107 std::cout <<
"eta set to " 108 << vm[
"eta"].as<
double>() <<
".\n";
109 eta = vm[
"eta"].as<
double>();
112 if (vm.count(
"winit")) {
113 std::cout <<
"winit set to " 114 << vm[
"winit"].as<
double>() <<
".\n";
115 winit = vm[
"winit"].as<
double>();
118 if (vm.count(
"nbinputs")) {
119 std::cout <<
"nbinputs set to " 120 << vm[
"nbinputs"].as<
int>() <<
".\n";
121 nbinputs = vm[
"nbinputs"].as<
int>();
124 if (vm.count(
"size")) {
125 std::cout <<
"size set to " 126 << vm[
"size"].as<
int>() <<
".\n";
127 size = vm[
"size"].as<
int>();
130 if (vm.count(
"seed")) {
131 std::cout <<
"seed set to " 132 << vm[
"seed"].as<
int>() <<
".\n";
133 seed = vm[
"seed"].as<
int>();
136 catch(std::exception& e) {
137 std::cerr <<
"error: " << e.what() <<
"\n";
141 std::cerr <<
"Exception of unknown type!\n";
156 float sparseness = 1.0;
158 stdp_con->
A = -1.20*tau_post/tau_pre*eta;
178 if (!
sys->run(simtime)) errcode = 1;
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
AurynFloat B
Definition: STDPConnection.h:61
NeuronID get_uid()
Get the unique ID of the class.
Definition: SpikingGroup.cpp:265
AurynFloat A
Definition: STDPConnection.h:60
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
A Checker class that tracks population firing rate as a moving average and breaks a run if it goes ou...
Definition: RateChecker.h:59
void add_equally_spaced(NeuronID number, NeuronID z=0)
Adds number of elements to the recording list that are equally spaced in the data vector of the conne...
Definition: WeightMonitor.cpp:145
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
Double STDP All-to-All Connection.
Definition: STDPConnection.h:40
virtual void set_max_weight(AurynWeight maximum_weight)
Sets maximum weight (for plastic connections).
Definition: SparseConnection.cpp:203
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
Conductance based LIF neuron model with absolute refractoriness as used in Vogels and Abbott 2005...
Definition: TIFGroup.h:38
virtual void set_min_weight(AurynWeight minimum_weight)
Sets minimum weight (for plastic connections).
Definition: SparseConnection.cpp:198
void set_online_rate_monitor_id(unsigned int id=0)
Sets the SpikingGroup used to display the rate estimate in the progressbar.
Definition: System.cpp:939
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
string fn(std::string extension)
Format output file name.
Definition: System.cpp:689
Records mean and standard deviation of a weight matrix in predefined intervals.
Definition: WeightStatsMonitor.h:42
Monitor class to record population firing rates.
Definition: PopulationRateMonitor.h:46
Monitors the evolution of a single or a set of weights.
Definition: WeightMonitor.h:65
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151