23#ifndef STDP_PL_SYNAPSE_HOM_H
24#define STDP_PL_SYNAPSE_HOM_H
131template <
typename target
identifierT >
227 return w + ( cp.
lambda_ * std::pow( w, cp.
mu_ ) * kplus );
234 return new_w > 0.0 ? new_w : 0.0;
243template <
typename target
identifierT >
255template <
typename target
identifierT >
261 const double t_spike = e.get_stamp().get_ms();
265 Node* target = get_target( t );
267 double dendritic_delay = get_delay();
270 std::deque< histentry >::iterator start;
271 std::deque< histentry >::iterator finish;
272 target->get_history( t_lastspike_ - dendritic_delay, t_spike - dendritic_delay, &start, &finish );
276 while ( start != finish )
278 minus_dt = t_lastspike_ - ( start->t_ + dendritic_delay );
282 assert( minus_dt < -1.0 *
kernel().connection_manager.get_stdp_eps() );
283 weight_ = facilitate_( weight_, Kplus_ * std::exp( minus_dt * cp.
tau_plus_inv_ ), cp );
287 weight_ = depress_( weight_, target->get_K_value( t_spike - dendritic_delay ), cp );
289 e.set_receiver( *target );
290 e.set_weight( weight_ );
291 e.set_delay_steps( get_delay_steps() );
292 e.set_rport( get_rport() );
295 Kplus_ = Kplus_ * std::exp( ( t_lastspike_ - t_spike ) * cp.
tau_plus_inv_ ) + 1.0;
297 t_lastspike_ = t_spike;
302template <
typename target
identifierT >
307 , t_lastspike_( 0.0 )
311template <
typename target
identifierT >
317 ConnectionBase::get_status( d );
325template <
typename target
identifierT >
330 ConnectionBase::set_status( d, cm );
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Class containing the common properties for all connections of a certain type.
Definition common_synapse_properties.h:50
Base class for dummy nodes used in connection testing.
Definition connection.h:67
Base class for representing connections.
Definition connection.h:110
void check_connection_(Node &dummy_target, Node &source, Node &target, const size_t receptor_type)
This function calls check_connection() on the sender to check if the receiver accepts the event type ...
Definition connection.h:319
long get_delay_steps() const
Return the delay of the connection in steps.
Definition connection.h:181
Node * get_target(const size_t tid) const
Definition connection.h:239
size_t get_rport() const
Definition connection.h:244
double get_delay() const
Return the delay of the connection in ms.
Definition connection.h:172
Definition connector_model.h:69
Encapsulate information sent between nodes.
Definition event.h:103
Base class for all NEST network objects.
Definition node.h:99
virtual void register_stdp_connection(double, double)
Register a STDP connection.
Definition node.cpp:211
Class containing the common properties for all synapses of type stdp_pl_synapse_hom.
Definition stdp_pl_synapse_hom.h:97
STDPPLHomCommonProperties()
Default constructor.
Definition stdp_pl_synapse_hom.cpp:45
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties from the values given in dictionary.
Definition stdp_pl_synapse_hom.cpp:67
void get_status(Dictionary &d) const
Get all properties and put them into a dictionary.
Definition stdp_pl_synapse_hom.cpp:56
double alpha_
Definition stdp_pl_synapse_hom.h:120
double tau_plus_
Definition stdp_pl_synapse_hom.h:117
double lambda_
Definition stdp_pl_synapse_hom.h:119
double tau_plus_inv_
1 / tau_plus for efficiency
Definition stdp_pl_synapse_hom.h:118
double mu_
Definition stdp_pl_synapse_hom.h:121
Event for spike information.
Definition event.h:418
Definition stdp_pl_synapse_hom.h:182
size_t handles_test_event(SpikeEvent &, size_t) override
Check if the node can handle a particular event and receptor type.
Definition stdp_pl_synapse_hom.h:188
Definition stdp_pl_synapse_hom.h:133
static constexpr ConnectionModelProperties properties
Definition stdp_pl_synapse_hom.h:139
void get_status(Dictionary &d) const
Get all properties of this connection and put them into a dictionary.
Definition stdp_pl_synapse_hom.h:313
double t_lastspike_
Definition stdp_pl_synapse_hom.h:240
void check_connection(Node &s, Node &t, size_t receptor_type, const CommonPropertiesType &)
Definition stdp_pl_synapse_hom.h:208
double weight_
Definition stdp_pl_synapse_hom.h:238
STDPPLHomCommonProperties CommonPropertiesType
Definition stdp_pl_synapse_hom.h:136
double get_delay() const
Return the delay of the connection in ms.
Definition connection.h:172
double depress_(double w, double kminus, const STDPPLHomCommonProperties &cp)
Definition stdp_pl_synapse_hom.h:231
stdp_pl_synapse_hom(const stdp_pl_synapse_hom &)=default
Copy constructor from a property object.
double Kplus_
Definition stdp_pl_synapse_hom.h:239
stdp_pl_synapse_hom & operator=(const stdp_pl_synapse_hom &)=default
bool send(Event &e, size_t t, const STDPPLHomCommonProperties &)
Send an event to the receiver of this connection.
Definition stdp_pl_synapse_hom.h:257
void set_weight(double w)
Definition stdp_pl_synapse_hom.h:218
double facilitate_(double w, double kplus, const STDPPLHomCommonProperties &cp)
Definition stdp_pl_synapse_hom.h:225
stdp_pl_synapse_hom()
Default Constructor.
Definition stdp_pl_synapse_hom.h:303
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties of this connection from the values given in dictionary.
Definition stdp_pl_synapse_hom.h:327
Connection< targetidentifierT > ConnectionBase
Definition stdp_pl_synapse_hom.h:137
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
const std::string Kplus("Kplus")
const std::string weight("weight")
const std::string size_of("sizeof")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_stdp_pl_synapse_hom(const std::string &name)
Class representing an STDP connection with homogeneous parameters, i.e.
Definition stdp_pl_synapse_hom.cpp:35
KernelManager & kernel()
Definition kernel_manager.h:311
ConnectionModelProperties
Definition connector_model.h:49
constexpr size_t invalid_port
Value for invalid connection port number.
Definition nest_types.h:141