44 double sparseness = 0.05;
48 bool wmatdump =
false;
49 double tau_chk = 100e-3;
50 double simtime = 3600.;
51 double stimtime = simtime;
52 double wmat_interval = 600.;
54 double ampa_nmda_ratio = 1.0;
63 string currentfile =
"";
74 bool noisyweights =
false;
75 bool switchweights =
false;
76 bool ei_plastic =
false;
81 double tau_decay = 3600.;
86 string infilename =
"";
88 const char * file_prefix =
"bg_static";
96 po::options_description desc(
"Allowed options");
98 (
"help",
"produce help message")
99 (
"quiet",
"quiet mode")
100 (
"bgrate", po::value<double>(),
"PoissonGroup external firing rate")
101 (
"sparseness", po::value<double>(),
"overall network sparseness")
102 (
"simtime", po::value<double>(),
"simulation time")
103 (
"dir", po::value<string>(),
"output dir")
104 (
"ne", po::value<int>(),
"no of exc units")
105 (
"adapt",
"adapting excitatory neurons")
106 (
"fast",
"turn off some of the monitors to run faster")
109 po::variables_map vm;
110 po::store(po::parse_command_line(ac, av, desc), vm);
113 if (vm.count(
"help")) {
114 std::cout << desc <<
"\n";
118 if (vm.count(
"quiet")) {
122 if (vm.count(
"scaling")) {
126 if (vm.count(
"load")) {
127 std::cout <<
"load from matrix " 128 << vm[
"load"].as<
string>() <<
".\n";
129 infilename = vm[
"load"].as<
string>();
132 if (vm.count(
"patfile")) {
133 std::cout <<
"PatternFile is " 134 << vm[
"patfile"].as<
string>() <<
".\n";
135 patfile = vm[
"patfile"].as<
string>();
138 if (vm.count(
"prefile")) {
139 std::cout <<
"Preload patternfile is " 140 << vm[
"prefile"].as<
string>() <<
".\n";
141 prefile = vm[
"prefile"].as<
string>();
144 if (vm.count(
"wmat")) {
146 std::cout <<
"wmat dump mode" << std::endl;
149 if (vm.count(
"bgrate")) {
150 std::cout <<
"bgrate set to " 151 << vm[
"bgrate"].as<
double>() <<
".\n";
152 bg_rate = vm[
"bgrate"].as<
double>();
155 if (vm.count(
"sparseness")) {
156 std::cout <<
"sparseness set to " 157 << vm[
"sparseness"].as<
double>() <<
".\n";
158 sparseness = vm[
"sparseness"].as<
double>();
161 if (vm.count(
"simtime")) {
162 std::cout <<
"simtime set to " 163 << vm[
"simtime"].as<
double>() <<
".\n";
164 simtime = vm[
"simtime"].as<
double>();
168 if (vm.count(
"dir")) {
169 std::cout <<
"dir set to " 170 << vm[
"dir"].as<
string>() <<
".\n";
171 dir = vm[
"dir"].as<
string>();
174 if (vm.count(
"wee")) {
175 std::cout <<
"wee set to " 176 << vm[
"wee"].as<
double>() <<
".\n";
177 w_ee = vm[
"wee"].as<
double>();
180 if (vm.count(
"wei")) {
181 std::cout <<
"wei set to " 182 << vm[
"wei"].as<
double>() <<
".\n";
183 w_ei = vm[
"wei"].as<
double>();
186 if (vm.count(
"wie")) {
187 std::cout <<
"wie set to " 188 << vm[
"wie"].as<
double>() <<
".\n";
189 w_ie = vm[
"wie"].as<
double>();
192 if (vm.count(
"wii")) {
193 std::cout <<
"wii set to " 194 << vm[
"wii"].as<
double>() <<
".\n";
195 w_ii = vm[
"wii"].as<
double>();
198 if (vm.count(
"ampa")) {
199 std::cout <<
"ampa set to " 200 << vm[
"ampa"].as<
double>() <<
".\n";
201 ampa_nmda_ratio = vm[
"ampa"].as<
double>();
205 if (vm.count(
"ne")) {
206 std::cout <<
"ne set to " 207 << vm[
"ne"].as<
int>() <<
".\n";
208 ne = vm[
"ne"].as<
int>();
212 if (vm.count(
"stimfile")) {
213 std::cout <<
"stimfile set to " 214 << vm[
"stimfile"].as<
string>() <<
".\n";
215 stimfile = vm[
"stimfile"].as<
string>();
218 if (vm.count(
"chk")) {
219 std::cout <<
"chk set to " 220 << vm[
"chk"].as<
double>() <<
".\n";
221 tau_chk = vm[
"chk"].as<
double>();
224 if (vm.count(
"adapt")) {
225 std::cout <<
"adaptation on " << std::endl;
229 if (vm.count(
"fast")) {
230 std::cout <<
"fast on " << std::endl;
235 catch(std::exception& e) {
236 std::cerr <<
"error: " << e.what() <<
"\n";
240 std::cerr <<
"Exception of unknown type!\n";
246 if (!infilename.empty()) {
247 std::stringstream iss;
249 infilename = iss.str();
258 ((
AIFGroup*)neurons_e)->set_ampa_nmda_ratio(ampa_nmda_ratio);
259 ((
AIFGroup*)neurons_e)->dg_adapt1=1.0;
262 ((
IFGroup*)neurons_e)->set_ampa_nmda_ratio(ampa_nmda_ratio);
271 ((
IFGroup*)neurons_i)->set_ampa_nmda_ratio(ampa_nmda_ratio);
277 msg =
"Setting up I connections ...";
280 w_ie,sparseness,
GABA);
282 w_ii,sparseness,
GABA);
284 msg =
"Setting up E connections ...";
287 w_ee,sparseness,
GLUT);
289 w_ei,sparseness,
GLUT);
291 msg =
"Setting up monitors ...";
296 sprintf(strbuf,
"%s/bg_static.%d.ras", dir.c_str(),
sys->
mpi_rank());
300 sprintf(strbuf,
"%s/bg_static.%d.prate", dir.c_str(),
sys->
mpi_rank());
303 sprintf(strbuf,
"%s/bg_static.%d.rt", dir.c_str(),
sys->
mpi_rank());
310 if (!
sys->run(simtime,
true))
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
void random_mem(AurynState mean=-60e-3, AurynState sigma=5e-3)
Definition: NeuronGroup.cpp:81
unsigned int mpi_rank()
Returns current rank.
Definition: System.cpp:1009
Monitor class to record the system time in every timestep.
Definition: RealTimeMonitor.h:45
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
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
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 set_tau_mem(AurynFloat taum)
Sets the membrane time constant.
Definition: IFGroup.cpp:154
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
A simple extension of IFGroup with spike triggered adaptation.
Definition: AIFGroup.h:37
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
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
Monitor class to record population firing rates.
Definition: PopulationRateMonitor.h:46
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
Implements the standard integrate and file model used in Auryn.
Definition: IFGroup.h:47