37 string file_prefix =
"parrot";
42 unsigned int seed = 1;
50 po::options_description desc(
"Allowed options");
52 (
"help",
"produce help message")
53 (
"simtime", po::value<double>(),
"simulation time")
54 (
"kappa", po::value<double>(),
"poisson group rate")
55 (
"dir", po::value<string>(),
"output directory")
56 (
"size", po::value<int>(),
"poisson group size")
57 (
"seed", po::value<int>(),
"random seed")
61 po::store(po::parse_command_line(ac, av, desc), vm);
64 if (vm.count(
"help")) {
65 std::cout << desc <<
"\n";
69 if (vm.count(
"kappa")) {
70 std::cout <<
"kappa set to " 71 << vm[
"kappa"].as<
double>() <<
".\n";
72 kappa = vm[
"kappa"].as<
double>();
75 if (vm.count(
"dir")) {
76 std::cout <<
"dir set to " 77 << vm[
"dir"].as<
string>() <<
".\n";
78 dir = vm[
"dir"].as<
string>();
81 if (vm.count(
"simtime")) {
82 std::cout <<
"simtime set to " 83 << vm[
"simtime"].as<
double>() <<
".\n";
84 simtime = vm[
"simtime"].as<
double>();
87 if (vm.count(
"size")) {
88 std::cout <<
"size set to " 89 << vm[
"size"].as<
int>() <<
".\n";
90 size = vm[
"size"].as<
int>();
93 if (vm.count(
"seed")) {
94 std::cout <<
"seed set to " 95 << vm[
"seed"].as<
int>() <<
".\n";
96 seed = vm[
"seed"].as<
int>();
99 catch(std::exception& e) {
100 std::cerr <<
"error: " << e.what() <<
"\n";
104 std::cerr <<
"Exception of unknown type!\n";
130 if (!
sys->run(simtime,
false))
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
void set_delay(int d)
Sets axonal delay for this SpikingGroup.
Definition: SpikingGroup.cpp:345
A SpikingGroup that copies the output of another source SpikingGroup.
Definition: ParrotGroup.h:47
void set_logfile_loglevel(LogMessageType level=NOTIFICATION)
Sets loglevel for file output.
Definition: Logger.cpp:63
SpikeMonitor that reads the delayed spikes as they are received by a postsynaptic neuron...
Definition: DelayedSpikeMonitor.h:49
A Checker class that tracks population firing rate as a moving average and breaks a run if it goes ou...
Definition: RateChecker.h:59
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
void set_master_seed(unsigned int seed=123)
Set master seed.
Definition: System.cpp:1014
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
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151