38 string file_prefix =
"inputchan";
41 unsigned int seed = 1;
49 po::options_description desc(
"Allowed options");
51 (
"help",
"produce help message")
52 (
"simtime", po::value<double>(),
"simulation time")
53 (
"kappa", po::value<double>(),
"inputchannels firing rate constant")
54 (
"dir", po::value<string>(),
"output directory")
55 (
"size", po::value<int>(),
"input group size")
56 (
"seed", po::value<int>(),
"random seed")
60 po::store(po::parse_command_line(ac, av, desc), vm);
63 if (vm.count(
"help")) {
64 std::cout << desc <<
"\n";
68 if (vm.count(
"kappa")) {
69 std::cout <<
"kappa set to " 70 << vm[
"kappa"].as<
double>() <<
".\n";
71 kappa = vm[
"kappa"].as<
double>();
74 if (vm.count(
"dir")) {
75 std::cout <<
"dir set to " 76 << vm[
"dir"].as<
string>() <<
".\n";
77 dir = vm[
"dir"].as<
string>();
80 if (vm.count(
"simtime")) {
81 std::cout <<
"simtime set to " 82 << vm[
"simtime"].as<
double>() <<
".\n";
83 simtime = vm[
"simtime"].as<
double>();
86 if (vm.count(
"size")) {
87 std::cout <<
"size set to " 88 << vm[
"size"].as<
int>() <<
".\n";
89 size = vm[
"size"].as<
int>();
92 if (vm.count(
"seed")) {
93 std::cout <<
"seed set to " 94 << vm[
"seed"].as<
int>() <<
".\n";
95 seed = vm[
"seed"].as<
int>();
98 catch(std::exception& e) {
99 std::cerr <<
"error: " << e.what() <<
"\n";
103 std::cerr <<
"Exception of unknown type!\n";
112 sys->run(simtime,
false);
void auryn_free()
Cleanly shuts down Auryn simulation environment.
Definition: auryn_global.cpp:107
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
System * sys
Global pointer to instance of System which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:37
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