examples:sim_epsp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
examples:sim_epsp [2014/01/10 19:46] – structure zenke | examples:sim_epsp [2016/08/11 07:37] (current) – Removes full prog zenke | ||
---|---|---|---|
Line 70: | Line 70: | ||
</ | </ | ||
This finally outputs a message '' | This finally outputs a message '' | ||
- | ===== The full program ===== | ||
- | <code c++> | ||
- | /* | ||
- | * Copyright 2014 Friedemann Zenke | ||
- | * | ||
- | * This file is part of Auryn, a simulation package for plastic | ||
- | * spiking neural networks. | ||
- | * | ||
- | * Auryn is free software: you can redistribute it and/or modify | ||
- | * it under the terms of the GNU General Public License as published by | ||
- | * the Free Software Foundation, either version 3 of the License, or | ||
- | * (at your option) any later version. | ||
- | * | ||
- | * Auryn is distributed in the hope that it will be useful, | ||
- | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
- | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
- | * GNU General Public License for more details. | ||
- | * | ||
- | * You should have received a copy of the GNU General Public License | ||
- | * along with Auryn. | ||
- | */ | ||
- | |||
- | #include < | ||
- | #include < | ||
- | #include < | ||
- | #include < | ||
- | |||
- | #include < | ||
- | #include < | ||
- | #include < | ||
- | #include < | ||
- | |||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | #include " | ||
- | |||
- | #define N 1 | ||
- | |||
- | using namespace std; | ||
- | |||
- | namespace po = boost:: | ||
- | namespace mpi = boost::mpi; | ||
- | |||
- | int main(int ac, char* av[]) | ||
- | { | ||
- | |||
- | int errcode = 0; | ||
- | char strbuf [255]; | ||
- | string outputfile = " | ||
- | string tmpstr; | ||
- | AurynWeight w = 1.0; | ||
- | |||
- | // BEGIN Global definitions | ||
- | mpi:: | ||
- | mpi:: | ||
- | communicator = &world; | ||
- | |||
- | sprintf(strbuf, | ||
- | string logfile = strbuf; | ||
- | logger = new Logger(logfile, | ||
- | |||
- | sys = new System(& | ||
- | // END Global definitions | ||
- | |||
- | PoissonGroup * poisson = new PoissonGroup(N, | ||
- | PoissonGroup * poisson2 = new PoissonGroup(N, | ||
- | IFGroup * neuron = new IFGroup(1); | ||
- | |||
- | IdentityConnection * con = new IdentityConnection(poisson, | ||
- | IdentityConnection * con2 = new IdentityConnection(poisson2, | ||
- | |||
- | tmpstr = outputfile; | ||
- | tmpstr += " | ||
- | SpikeMonitor * smon = new SpikeMonitor( neuron, tmpstr.c_str() ); | ||
- | |||
- | tmpstr = outputfile; | ||
- | tmpstr += " | ||
- | VoltageMonitor * vmon = new VoltageMonitor( neuron, 0, tmpstr.c_str() ); | ||
- | |||
- | tmpstr = outputfile; | ||
- | tmpstr += " | ||
- | AmpaMonitor * amon = new AmpaMonitor( neuron, 0, tmpstr.c_str() ); | ||
- | |||
- | tmpstr = outputfile; | ||
- | tmpstr += " | ||
- | GabaMonitor * gmon = new GabaMonitor( neuron, 0, tmpstr.c_str() ); | ||
- | |||
- | tmpstr = outputfile; | ||
- | tmpstr += " | ||
- | NmdaMonitor * nmon = new NmdaMonitor( neuron, 0, tmpstr.c_str() ); | ||
- | |||
- | logger-> | ||
- | sys-> | ||
- | |||
- | logger-> | ||
- | delete sys; | ||
- | |||
- | if (errcode) | ||
- | env.abort(errcode); | ||
- | return errcode; | ||
- | } | ||
- | </ | ||
examples/sim_epsp.txt · Last modified: 2016/08/11 07:37 by zenke