23#ifndef TSODYKS2_SYNAPSE_H
24#define TSODYKS2_SYNAPSE_H
117template <
typename target
identifierT >
212template <
typename target
identifierT >
220template <
typename target
identifierT >
224 Node* target = get_target( t );
225 const double t_spike = e.get_stamp().get_ms();
227 if ( t_lastspike_ >= 0.0 )
231 const double h = t_spike - t_lastspike_;
232 double x_decay = std::exp( -h / tau_rec_ );
233 double u_decay = ( tau_fac_ == 0 ) ? 0.0 : std::exp( -h / tau_fac_ );
236 x_ = 1. + ( x_ - x_ * u_ - 1. ) * x_decay;
237 u_ = U_ + u_ * ( 1. - U_ ) * u_decay;
241 e.set_receiver( *target );
242 e.set_weight( x_ * u_ * weight_ );
244 e.set_delay_steps( get_delay_steps() );
245 e.set_rport( get_rport() );
248 t_lastspike_ = t_spike;
253template <
typename target
identifierT >
262 , t_lastspike_( -1.0 )
266template <
typename target
identifierT >
270 ConnectionBase::get_status( d );
281template <
typename target
identifierT >
285 ConnectionBase::set_status( d, cm );
289 if ( U_ > 1.0 or U_ < 0.0 )
295 if ( u_ > 1.0 or u_ < 0.0 )
301 if ( tau_rec_ <= 0.0 )
307 if ( tau_fac_ < 0.0 )
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition exceptions.h:680
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
Event for spike information.
Definition event.h:418
Definition tsodyks2_synapse.h:175
size_t handles_test_event(SpikeEvent &, size_t) override
Check if the node can handle a particular event and receptor type.
Definition tsodyks2_synapse.h:181
Definition tsodyks2_synapse.h:119
void set_weight(double w)
Definition tsodyks2_synapse.h:196
CommonSynapseProperties CommonPropertiesType
Definition tsodyks2_synapse.h:121
Connection< targetidentifierT > ConnectionBase
Definition tsodyks2_synapse.h:122
static constexpr ConnectionModelProperties properties
Definition tsodyks2_synapse.h:124
double weight_
Definition tsodyks2_synapse.h:203
double u_
dynamic value of probability of release
Definition tsodyks2_synapse.h:205
bool send(Event &e, size_t t, const CommonSynapseProperties &cp)
Send an event to the receiver of this connection.
Definition tsodyks2_synapse.h:222
double t_lastspike_
time point of last spike emitted
Definition tsodyks2_synapse.h:209
double x_
current fraction of the synaptic weight
Definition tsodyks2_synapse.h:206
void check_connection(Node &s, Node &t, size_t receptor_type, const CommonPropertiesType &)
Definition tsodyks2_synapse.h:189
void get_status(Dictionary &d) const
Get all properties of this connection and put them into a dictionary.
Definition tsodyks2_synapse.h:268
double U_
unit increment of a facilitating synapse
Definition tsodyks2_synapse.h:204
tsodyks2_synapse()
Default Constructor.
Definition tsodyks2_synapse.h:254
~tsodyks2_synapse()
Default Destructor.
Definition tsodyks2_synapse.h:144
tsodyks2_synapse & operator=(const tsodyks2_synapse &)=default
double tau_rec_
[ms] time constant for recovery
Definition tsodyks2_synapse.h:207
tsodyks2_synapse(const tsodyks2_synapse &)=default
Copy constructor from a property object.
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties of this connection from the values given in dictionary.
Definition tsodyks2_synapse.h:283
double tau_fac_
[ms] time constant for facilitation
Definition tsodyks2_synapse.h:208
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 tau_fac("tau_fac")
const std::string dU("U")
const std::string weight("weight")
const std::string size_of("sizeof")
const std::string tau_rec("tau_rec")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_tsodyks2_synapse(const std::string &name)
Definition tsodyks2_synapse.cpp:32
ConnectionModelProperties
Definition connector_model.h:49
constexpr size_t invalid_port
Value for invalid connection port number.
Definition nest_types.h:141