NEST main@caf0ae8
 
Loading...
Searching...
No Matches
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// Includes from nestkernel:
27#include "event.h"
28#include "nest_types.h"
29#include "node.h"
30#include "ring_buffer.h"
31#include "spikecounter.h"
32
33
34namespace nest
35{
36
37/* BeginUserDocs: device, generator
38
39Short description
40+++++++++++++++++
41
42Support node for neuromodulated synaptic plasticity
43
44Description
45+++++++++++
46
47The volume transmitter is used in combination with neuromodulated
48synaptic plasticity, plasticity that depends not only on the activity
49of the pre- and the postsynaptic neuron but also on a non-local
50neuromodulatory third signal. It collects the spikes from all neurons
51connected to the volume transmitter and delivers the spikes to a
52subset of synapses in the network. The user specifies this subset by
53passing the volume transmitter as a parameter when a neuromodulatory
54synapse is defined.
55
56It is assumed that the neuromodulatory signal is a function of the
57spike times of all spikes emitted by the population of neurons
58connected to the volume transmitter. The neuromodulatory dynamics is
59calculated in the synapses itself.
60
61The volume transmitter interacts in a hybrid structure with the
62neuromodulated synapses: In addition to the delivery of the
63neuromodulatory spikes triggered by every pre-synaptic spike, the
64neuromodulatory spike history is delivered at regular time
65intervals. The interval is equal to ``deliver_interval * d_min``,
66where ``deliver_interval`` is an (integer) entry in the parameter
67dictionary and ``d_min`` is the minimal synaptic delay.
68
69The implementation is based on the framework presented in :footcite:p:`Potjans2010`.
70
71Please note that the ``volume_transmitter`` property of a synapse can
72only be set by means of :py:func:`.CopyModel` or
73:py:func:`.SetDefaults`; setting the property inside of a
74:py:func:`.Connect` call is not supported for technical reasons.
75
76
77Parameters
78++++++++++
79
80deliver_interval
81 Time interval given in d_min time steps in which the volume signal
82 is delivered from the volume transmitter to the assigned synapses.
83 Must be integer.
84
85References
86++++++++++
87
88
89.. footbibliography::
90
91Receives
92++++++++
93
94SpikeEvent
95
96See also
97++++++++
98
99stdp_dopamine_synapse
100
101
102Examples using this model
103+++++++++++++++++++++++++
104
105.. listexamples:: volume_transmitter
106
107EndUserDocs */
108
109class ConnectorBase;
110
111void register_volume_transmitter( const std::string& name );
112
114{
115
116public:
119
120 bool
121 has_proxies() const override
122 {
123 return false;
124 }
125
126 bool
127 local_receiver() const override
128 {
129 return false;
130 }
131
132 std::string
133 get_element_type() const override
134 {
135 return names::other;
136 }
137
143 using Node::handle;
145
146 void handle( SpikeEvent& ) override;
147
148 size_t handles_test_event( SpikeEvent&, size_t ) override;
149
150 void get_status( Dictionary& d ) const override;
151 void set_status( const Dictionary& d ) override;
152
158 void set_local_device_id( const size_t ldid ) override;
159 size_t get_local_device_id() const override;
160
161 const std::vector< spikecounter >& deliver_spikes();
162
163private:
164 void init_buffers_() override;
165 void pre_run_hook() override;
166
167 void update( const Time&, const long, const long ) override;
168
169 // --------------------------------------------
170
175 {
176 Parameters_();
177 void get( Dictionary& ) const;
178 void set( const Dictionary&, Node* node );
180 };
181
182 //-----------------------------------------------
183
184 struct Buffers_
185 {
188 std::vector< spikecounter > spikecounter_;
189 };
190
193
195};
196
197inline size_t
199{
200 if ( receptor_type != 0 )
201 {
202 throw UnknownReceptorType( receptor_type, get_name() );
203 }
204 return 0;
205}
206
207inline void
209{
210 P_.get( d );
211}
212
213inline void
215{
216 Parameters_ ptmp = P_; // temporary copy in case of errors
217 ptmp.set( d, this ); // throws if BadProperty
218
219 // if we get here, temporaries contain consistent set of properties
220 P_ = ptmp;
221}
222
223inline const std::vector< spikecounter >&
228
229inline void
231{
232 local_device_id_ = ldid;
233}
234
235inline size_t
240
241} // namespace
242
243#endif /* #ifndef VOLUME_TRANSMITTER_H */
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Base class for all NEST network objects.
Definition node.h:99
std::string get_name() const
Return class name.
Definition node.cpp:105
Buffer Layout.
Definition ring_buffer.h:83
Event for spike information.
Definition event.h:418
Definition nest_time.h:135
Exception to be thrown if the specified receptor type does not exist in the node.
Definition exceptions.h:417
Definition volume_transmitter.h:114
size_t get_local_device_id() const override
Gets the local device id.
Definition volume_transmitter.h:236
Buffers_ B_
Definition volume_transmitter.h:192
size_t local_device_id_
Definition volume_transmitter.h:194
std::string get_element_type() const override
Return the element type of the node.
Definition volume_transmitter.h:133
void pre_run_hook() override
Re-calculate dependent parameters of the node.
Definition volume_transmitter.cpp:99
const std::vector< spikecounter > & deliver_spikes()
Definition volume_transmitter.h:224
bool has_proxies() const override
Returns true if the node has proxies on remote threads.
Definition volume_transmitter.h:121
void set_status(const Dictionary &d) override
Change properties of the node according to the entries in the dictionary.
Definition volume_transmitter.h:214
size_t handles_test_event(SpikeEvent &, size_t) override
Check if the node can handle a particular event and receptor type.
Definition volume_transmitter.h:198
Parameters_ P_
Definition volume_transmitter.h:191
volume_transmitter()
Definition volume_transmitter.cpp:76
void update(const Time &, const long, const long) override
Advance the state of the node in time through the given interval.
Definition volume_transmitter.cpp:106
bool local_receiver() const override
Returns true if the node only receives events from nodes/devices on the same thread.
Definition volume_transmitter.h:127
void get_status(Dictionary &d) const override
Export properties of the node by setting entries in the status dictionary.
Definition volume_transmitter.h:208
void handle(SpikeEvent &) override
Handle incoming spike events.
Definition volume_transmitter.cpp:143
void init_buffers_() override
Configure persistent internal data structures.
Definition volume_transmitter.cpp:91
void set_local_device_id(const size_t ldid) override
Since volume transmitters are duplicated on each thread, and are hence treated just as devices during...
Definition volume_transmitter.h:230
virtual size_t handles_test_event(SpikeEvent &, size_t receptor_type)
Check if the node can handle a particular event and receptor type.
Definition node.cpp:271
virtual void handle(SpikeEvent &e)
Handle incoming spike events.
Definition node.cpp:265
const std::string other("other")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_volume_transmitter(const std::string &name)
Definition volume_transmitter.cpp:41
Declarations for base class Node.
Definition volume_transmitter.h:185
std::vector< spikecounter > spikecounter_
vector to store and deliver spikes
Definition volume_transmitter.h:188
RingBuffer neuromodulatory_spikes_
buffer to store incoming spikes
Definition volume_transmitter.h:186
Independent parameters of the model.
Definition volume_transmitter.h:175
void set(const Dictionary &, Node *node)
Definition volume_transmitter.cpp:67
long deliver_interval_
update interval in d_min time steps
Definition volume_transmitter.h:179
void get(Dictionary &) const
Definition volume_transmitter.cpp:61
Parameters_()
Definition volume_transmitter.cpp:51