Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
AdExGroup.h
Go to the documentation of this file.
1 /*
2 * Copyright 2014-2018 Ankur Sinha and Friedemann Zenke
3 *
4 * This file is part of Auryn, a simulation package for plastic
5 * spiking neural networks.
6 *
7 * Auryn is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * Auryn is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Auryn. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * If you are using Auryn or parts of it for your work please cite:
21 * Zenke, F. and Gerstner, W., 2014. Limits to high-speed simulations
22 * of spiking neural networks using general-purpose computers.
23 * Front Neuroinform 8, 76. doi: 10.3389/fninf.2014.00076
24 */
25 
26 #ifndef ADEXGROUP_H_
27 #define ADEXGROUP_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "NeuronGroup.h"
32 #include "System.h"
33 
34 
35 namespace auryn {
36 
46 class AdExGroup : public NeuronGroup
47 {
48 private:
49  AurynFloat e_rest, e_reset, e_rev_gaba, e_rev_ampa,e_thr, g_leak, c_mem, deltat;
50  AurynFloat tau_ampa, tau_gaba, tau_mem;
51  AurynFloat scale_ampa, scale_gaba, scale_mem, scale_w, scale_current;
52  AurynFloat * t_w;
53  AurynFloat a;
54  AurynFloat b;
55  AurynFloat tau_w;
56  unsigned short refractory_time;
57  auryn_vector_ushort * ref;
58 
60  AurynStateVector * w;
61 
62  AurynStateVector * I_exc;
63  AurynStateVector * I_inh;
64  AurynStateVector * I_leak;
65  AurynStateVector * temp;
66 
67  AurynFloat * t_g_ampa;
68  AurynFloat * t_g_gaba;
69  AurynFloat * t_mem;
70  unsigned short * t_ref;
71 
72  void init();
73  void calculate_scale_constants();
74  inline void integrate_state();
75  inline void check_thresholds();
76  virtual std::string get_output_line(NeuronID i);
77  virtual void load_input_line(NeuronID i, const char * buf);
78 
79  void virtual_serialize(boost::archive::binary_oarchive & ar, const unsigned int version );
80  void virtual_serialize(boost::archive::binary_iarchive & ar, const unsigned int version );
81 public:
84  virtual ~AdExGroup();
85 
88 
90  void set_delta_t(AurynFloat d);
91 
95  void set_g_leak(AurynFloat g);
96 
101  void set_c_mem(AurynFloat cm);
102 
108  void set_a(AurynFloat _a);
109 
115  void set_b(AurynFloat _b);
116 
118  void set_e_reset(AurynFloat ereset);
119 
121  void set_e_rest(AurynFloat erest);
122 
124  void set_e_thr(AurynFloat ethr);
125 
127  void set_tau_w(AurynFloat tauw);
128 
129 
131  void set_tau_ampa(AurynFloat tau);
132 
135 
137  void set_tau_gaba(AurynFloat tau);
138 
141 
143  void clear();
144 
146  void evolve();
147 };
148 
149 }
150 
151 #endif /*ADEXGROUP_H_*/
152 
Default Auryn vector template.
Definition: auryn_definitions.h:327
void clear()
Definition: AdExGroup.cpp:86
void set_a(AurynFloat _a)
Set value of a in units S ( default 4nS )
Definition: AdExGroup.cpp:194
AdExGroup(NeuronID size)
Definition: AdExGroup.cpp:30
void set_e_rest(AurynFloat erest)
Definition: AdExGroup.cpp:187
void set_refractory_period(AurynDouble t)
Definition: AdExGroup.cpp:270
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
virtual ~AdExGroup()
Definition: AdExGroup.cpp:98
Conductance based Adaptive Exponential neuron model - Brette and Gerstner (2005). ...
Definition: AdExGroup.h:46
Definition: ABSConnection.h:38
void set_delta_t(AurynFloat d)
Set value of slope factor deltat (default 2mV)
Definition: AdExGroup.cpp:204
void set_tau_ampa(AurynFloat tau)
Definition: AdExGroup.cpp:248
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
void set_tau_w(AurynFloat tauw)
Definition: AdExGroup.cpp:172
void set_c_mem(AurynFloat cm)
Sets the membrane capacitance (default 281pF)
Definition: AdExGroup.cpp:216
void set_e_thr(AurynFloat ethr)
Definition: AdExGroup.cpp:183
void set_g_leak(AurynFloat g)
Sets the leak conductance (default 30nS)
Definition: AdExGroup.cpp:209
AurynFloat get_tau_ampa()
Definition: AdExGroup.cpp:254
void set_b(AurynFloat _b)
Set value of b in units of A ( default 0.0805nA )
Definition: AdExGroup.cpp:199
AurynFloat get_tau_gaba()
Definition: AdExGroup.cpp:265
NeuronID size
Stores the size of the group.
Definition: SpikingGroup.h:119
void set_e_reset(AurynFloat ereset)
Definition: AdExGroup.cpp:178
void set_tau_gaba(AurynFloat tau)
Definition: AdExGroup.cpp:259
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
void evolve()
Definition: AdExGroup.cpp:106
std::string string
Standard library string type which is imported into Auryn namespace.
Definition: auryn_definitions.h:156
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151