NEST  2.6.0,not_revisioned_source_dir@0
volume_transmitter.h
Go to the documentation of this file.
1 /*
2  * volume_transmitter.h
3  *
4  * This file is part of NEST.
5  *
6  * Copyright (C) 2004 The NEST Initiative
7  *
8  * NEST is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * NEST is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef VOLUME_TRANSMITTER_H
24 #define VOLUME_TRANSMITTER_H
25 
26 #include "nest.h"
27 #include "event.h"
28 #include "archiving_node.h"
29 #include "ring_buffer.h"
30 #include "spikecounter.h"
31 #include "namedatum.h"
32 
33 
34 /* BeginDocumentation
35 
36 Name: volume_transmitter - Node used in combination with neuromodulated synaptic plasticity. It collects all spikes emitted by the population of neurons connected to the volume transmitter and transmits the signal to a user-specific subset of synapses.
37 
38 Description:
39 The volume transmitter is used in combination with neuromodulated
40 synaptic plasticty, plasticity that depends not only on the activity
41 of the pre- and the postsynaptic neuron but also on a non-local
42 neuromodulatory third signal. It collects the spikes from all neurons
43 connected to the volume transmitter and delivers the spikes to a
44 user-specific subset of synapses. It is assumed that the
45 neuromodulatory signal is a function of the spike times of all spikes
46 emitted by the population of neurons connected to the volume
47 transmitter. The neuromodulatory dynamics is calculated in the
48 synapses itself. The volume transmitter interacts in a hybrid
49 structure with the neuromodulated synapses. In addition to the
50 delivery of the neuromodulatory spikes triggered by every pre-synaptic
51 spike, the neuromodulatory spike history is delivered in discrete time
52 intervals of a manifold of the minimal synaptic delay. In order to
53 insure the link between the neuromodulatory synapses and the volume
54 transmitter, the volume transmitter is passed as a parameter when a
55 neuromodulatory synapse is defined. The implementation is based on the
56 framework presented in [1].
57 
58 Examples:
59 /volume_transmitter Create /vol Set
60 /iaf_neuron Create /pre_neuron Set
61 /iaf_neuron Create /post_neuron Set
62 /iaf_neuron Create /neuromod_neuron Set
63 /stdp_dopamine_synapse << /vt vol >> SetDefaults
64 neuromod_neuron vol Connect
65 pre_neuron post_neuron /stdp_dopamine_synapse Connect
66 
67 Parameters:
68 deliver_interval - time interval given in d_min time steps, in which
69  the volume signal is delivered from the volume
70  transmitter to the assigned synapses
71 
72 References:
73 [1] Potjans W, Morrison A and Diesmann M (2010). Enabling functional
74  neural circuit simulations with distributed computing of
75  neuromodulated plasticity.
76  Front. Comput. Neurosci. 4:141. doi:10.3389/fncom.2010.00141
77 
78 Author: Wiebke Potjans, Abigail Morrison
79 Remarks: major changes to update function after code revision in Apr 2013 (SK)
80 Receives: SpikeEvent
81 
82 SeeAlso: stdp_dopamine_synapse
83 
84 */
85 
86 namespace nest
87 {
88 
89  class Network;
90  class ConnectorBase;
91 
107  {
108 
109  public:
110 
113 
114  bool has_proxies() const { return false; }
115  bool local_receiver() const { return false; }
116 
121  using Node::handle;
123 
124  void handle(SpikeEvent&);
125 
127 
128  void get_status(DictionaryDatum& d) const;
129  void set_status(const DictionaryDatum& d) ;
130 
131  const vector<spikecounter>& deliver_spikes();
132 
133  private:
134 
135  void init_state_(Node const &);
136  void init_buffers_();
137  void calibrate();
138 
139  void update(const Time&, const long_t, const long_t);
140 
141  // --------------------------------------------
142 
146  struct Parameters_ {
147  Parameters_();
148  void get(DictionaryDatum&) const;
149  void set(const DictionaryDatum&);
151  };
152 
153  //-----------------------------------------------
154 
155  struct Buffers_ {
157  vector<spikecounter> spikecounter_;
158  };
159 
162 
163  };
164 
165  inline
167  {
168  if (receptor_type != 0)
169  throw UnknownReceptorType(receptor_type, get_name());
170  return 0;
171  }
172 
173  inline
175  {
176  P_.get(d);
178 
180  }
181 
182  inline
184  {
185  Parameters_ ptmp = P_; // temporary copy in case of errors
186  ptmp.set(d); // throws if BadProperty
187 
188  // We now know that (ptmp, stmp) are consistent. We do not
189  // write them back to (P_, S_) before we are also sure that
190  // the properties to be set in the parent class are internally
191  // consistent.
193 
194  // if we get here, temporaries contain consistent set of properties
195  P_ = ptmp;
196  }
197 
198  inline
199  const vector<nest::spikecounter>& volume_transmitter::deliver_spikes()
200  {
201  return B_.spikecounter_;
202  }
203 
204 } // namespace
205 
206 #endif /* #ifndef VOLUME_TRANSMITTER_H */
void calibrate()
Re-calculate dependent parameters of the node.
Definition: volume_transmitter.cpp:83
void update(const Time &, const long_t, const long_t)
Bring the node from state $t$ to $t+n*dt$.
Definition: volume_transmitter.cpp:89
Definition of Archiving_Node which is capable of recording and managing a spike history.
const Name receptor_type("receptor_type")
Connection parameters.
Definition: nest_names.h:240
Parameters_ P_
Definition: volume_transmitter.h:160
Definition: lockptrdatum.h:40
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
bool has_proxies() const
Returns true if the node has proxies on remote threads.
Definition: volume_transmitter.h:114
port handles_test_event(SpikeEvent &, rport)
Check if the node can handle a particular event and receptor type.
Definition: volume_transmitter.h:166
Buffers_ B_
Definition: volume_transmitter.h:161
const vector< spikecounter > & deliver_spikes()
Definition: volume_transmitter.h:199
const Name element_type("element_type")
Node type.
Definition: nest_names.h:117
long_t rport
Connection port number to distinguish incoming connections, also called receiver port.
Definition: nest.h:147
void set(const DictionaryDatum &)
RingBuffer neuromodulatory_spikes_
buffer to store incoming spikes
Definition: volume_transmitter.h:156
Parameters_()
Definition: volume_transmitter.cpp:40
Independent parameters of the model.
Definition: volume_transmitter.h:146
Definition: nest_time.h:130
std::string get_name() const
Return class name.
Definition: node.cpp:83
const Name other("other")
Node type.
Definition: nest_names.h:216
void get_status(DictionaryDatum &d) const
Definition: volume_transmitter.h:174
void set_status(const DictionaryDatum &d)
Definition: archiving_node.cpp:185
vector< spikecounter > spikecounter_
vector to store and deliver spikes
Definition: volume_transmitter.h:157
Exception to be thrown if the specified receptor type does not exist in the node. ...
Definition: exceptions.h:254
void init_buffers_()
Private function to initialize the buffers of a node.
Definition: volume_transmitter.cpp:75
volume transmitter class.
Definition: volume_transmitter.h:106
a node which archives spike history for the purposes of timing dependent plasticity ...
Definition: archiving_node.h:50
long_t port
Connection port number to distinguis outgoing connections.
Definition: nest.h:155
virtual void handle(SpikeEvent &e)
Handle incoming spike events.
Definition: node.cpp:198
void handle(SpikeEvent &)
Handle incoming spike events.
Definition: volume_transmitter.cpp:120
void set_status(const DictionaryDatum &d)
Definition: volume_transmitter.h:183
virtual port handles_test_event(SpikeEvent &, rport receptor_type)
Check if the node can handle a particular event and receptor type.
Definition: node.cpp:203
bool local_receiver() const
Returns true if the node only receives events from nodes/devices on the same thread.
Definition: volume_transmitter.h:115
Definition: namedatum.h:90
Part of definition of volume_transmitter to record and manage spike times and multiplicity of neurons...
Default types used by the NEST kernel.
void get_status(DictionaryDatum &d) const
Definition: archiving_node.cpp:175
Event for spike information.
Definition: event.h:320
Base class for all NEST network objects.
Definition: node.h:96
Definition: volume_transmitter.h:155
void get(DictionaryDatum &) const
Definition: volume_transmitter.cpp:48
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96
void init_state_(Node const &)
Private function to initialize the state of a node to model defaults.
Definition: volume_transmitter.cpp:72
Buffer Layout.
Definition: ring_buffer.h:77
volume_transmitter()
Definition: volume_transmitter.cpp:62
long_t deliver_interval_
update interval in d_min time steps
Definition: volume_transmitter.h:150