51 double wmax = 1000*gamma*w;
53 double sparseness = 0.02;
57 double tau_stdp = 20e-3 ;
58 bool stdp_active =
true;
59 bool poisson_stim =
false;
60 bool record_voltage =
false;
65 double bg_current = 2.0e-2;
67 double sparseness_afferents = 0.05;
71 double simtime = 1000. ;
75 string simname =
"isp_big";
76 string infilename =
"";
77 string patfilename =
"";
78 string outputfile =
"";
88 po::options_description desc(
"Allowed options");
90 (
"help",
"produce help message")
91 (
"quiet",
"quiet mode")
92 (
"save",
"save state at the end for loading")
93 (
"voltage",
"activate voltage monitor")
94 (
"load", po::value<string>(),
"input weight matrix")
95 (
"pat", po::value<string>(),
"pattern file")
96 (
"dir", po::value<string>(),
"output dir")
97 (
"stimfile", po::value<string>(),
"stimulus file")
98 (
"eta", po::value<double>(),
"learning rate")
99 (
"kappa", po::value<double>(),
"target rate")
100 (
"simtime", po::value<double>(),
"simulation time")
101 (
"active", po::value<bool>(),
"toggle learning")
102 (
"poisson", po::value<bool>(),
"toggle poisson stimulus")
103 (
"winh", po::value<double>(),
"inhibitory weight multiplier")
104 (
"wei", po::value<double>(),
"ei weight multiplier")
105 (
"chi", po::value<double>(),
"chi recall parameter")
106 (
"lambda", po::value<double>(),
"lambda storage parameter")
107 (
"sparseness", po::value<double>(),
"sparseness of connections")
110 po::variables_map vm;
111 po::store(po::parse_command_line(ac, av, desc), vm);
114 if (vm.count(
"help")) {
115 std::cout << desc <<
"\n";
119 if (vm.count(
"quiet")) {
123 if (vm.count(
"save")) {
127 if (vm.count(
"voltage")) {
128 record_voltage =
true;
131 if (vm.count(
"load")) {
132 infilename = vm[
"load"].as<
string>();
135 if (vm.count(
"pat")) {
136 patfilename = vm[
"pat"].as<
string>();
139 if (vm.count(
"dir")) {
140 dir = vm[
"dir"].as<
string>();
143 if (vm.count(
"stimfile")) {
144 stimfile = vm[
"stimfile"].as<
string>();
147 if (vm.count(
"eta")) {
148 eta = vm[
"eta"].as<
double>();
151 if (vm.count(
"kappa")) {
152 kappa = vm[
"kappa"].as<
double>();
155 if (vm.count(
"simtime")) {
156 simtime = vm[
"simtime"].as<
double>();
159 if (vm.count(
"active")) {
160 stdp_active = vm[
"active"].as<
bool>();
163 if (vm.count(
"poisson")) {
164 poisson_stim = vm[
"poisson"].as<
bool>();
168 if (vm.count(
"winh")) {
169 winh = vm[
"winh"].as<
double>();
172 if (vm.count(
"wei")) {
173 wei = vm[
"wei"].as<
double>();
176 if (vm.count(
"chi")) {
177 chi = vm[
"chi"].as<
double>();
180 if (vm.count(
"lambda")) {
181 lambda = vm[
"lambda"].as<
double>();
184 if (vm.count(
"sparseness")) {
185 sparseness = vm[
"sparseness"].as<
double>();
189 catch(std::exception& e) {
190 std::cerr <<
"error: " << e.what() <<
"\n";
194 std::cerr <<
"Exception of unknown type!\n";
218 if ( !stimfile.empty() && poisson_stim==
true) {
227 strbuf +=
".stimact";
246 if (!infilename.empty()) {
254 if (!patfilename.empty()) {
274 if ( record_voltage ) {
290 for (
int j = 0; j < (
NE) ; j++ ) {
294 for (
int j = 0; j < (
NI) ; j++ ) {
300 if (!stimfile.empty() && poisson_stim==
false) {
303 std::ifstream fin(stimfile.c_str());
305 std::cout <<
"There was a problem opening file " 313 while ( fin.getline(buffer,256) ) {
314 std::stringstream iss( buffer );
318 if (poisson_stim==
false) {
329 for (
int j = 0; j < (
NE) ; j++ ) {
338 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 set_mean_on_period(AurynFloat period)
Set mean on period.
Definition: StimulusGroup.cpp:156
#define NI
Number of inhibitory neurons.
Definition: sim_isp_big.cpp:41
void random_mem(AurynState mean=-60e-3, AurynState sigma=5e-3)
Definition: NeuronGroup.cpp:81
void load_network_state(std::string basename)
Loads network state from a netstate file.
Definition: System.cpp:812
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
Definition: auryn_definitions.h:148
Monitor class to record population firing rates.
Definition: PatternMonitor.h:47
Logger * logger
Global pointer to instance of Logger which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:36
void set_simulation_name(std::string name)
Sets the simulation name.
Definition: System.cpp:654
The standard Monitor object to record spikes from a SpikingGroup and write them to a text file...
Definition: SpikeMonitor.h:52
virtual void set_all(AurynWeight weight)
Sets all weights of existing connections to the given value.
Definition: SparseConnection.cpp:335
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
Provides a poisson stimulus at random intervals in one or more predefined subsets of the group that a...
Definition: StimulusGroup.h:50
Records the membrane potential from one unit from the source neuron group to a file.
Definition: VoltageMonitor.h:48
#define NE
Number of excitatory neurons.
Definition: sim_isp_big.cpp:40
Conductance based LIF neuron model with absolute refractoriness as used in Vogels and Abbott 2005...
Definition: TIFGroup.h:38
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 set_bg_current(NeuronID i, AurynFloat current)
Controls the constant current input (per default set so zero) to neuron i.
Definition: TIFGroup.cpp:121
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
void load_patterns(string filename, AurynWeight strength, int nb_max_patterns=10000, bool overwrite=false, bool chainmode=false)
Reads first n patterns from a .pat file and adds them as Hebbian assemblies onto an existing weight m...
Definition: SparseConnection.cpp:1057
void save_network_state(std::string basename)
Saves network state to a netstate file.
Definition: System.cpp:694
void set_mean_off_period(AurynFloat period)
Set mean quiet interval between consecutive stimuli.
Definition: StimulusGroup.cpp:150
Records from an arbitray state vector of one unit from the source SpikingGroup to a file...
Definition: StateMonitor.h:40
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
Provides a unity matrix like connectivity.
Definition: IdentityConnection.h:47