23#ifndef TSODYKS_SYNAPSE_HOM_H
24#define TSODYKS_SYNAPSE_HOM_H
173template <
typename target
identifierT >
253 "Setting of individual weights is not possible! The common weights can "
254 "be changed via CopyModel()." );
264template <
typename target
identifierT >
272template <
typename target
identifierT >
276 const double t_spike = e.get_stamp().get_ms();
277 const double h = t_spike - t_lastspike_;
286 double Pyy = std::exp( -h / cp.
tau_psc_ );
287 double Pzz = std::exp( -h / cp.
tau_rec_ );
290 double Pxz = 1.0 - Pzz;
292 double z = 1.0 - x_ - y_;
298 x_ += Pxy * y_ + Pxz * z;
302 u_ += cp.
U_ * ( 1.0 - u_ );
305 double delta_y_tsp = u_ * x_;
312 e.set_receiver( *get_target( t ) );
313 e.set_weight( delta_y_tsp * cp.
get_weight() );
314 e.set_delay_steps( get_delay_steps() );
315 e.set_rport( get_rport() );
318 t_lastspike_ = t_spike;
323template <
typename target
identifierT >
329 , t_lastspike_( 0.0 )
333template <
typename target
identifierT >
337 ConnectionBase::get_status( d );
344template <
typename target
identifierT >
363 ConnectionBase::set_status( d, cm );
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 synapses with common weight.
Definition common_properties_hom_w.h:36
double get_weight() const
Definition common_properties_hom_w.h:52
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
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
Exception to be thrown if a feature is unavailable.
Definition exceptions.h:108
Event for spike information.
Definition event.h:418
Class containing the common properties for all synapses of type tsodyks_synapse_hom.
Definition tsodyks_synapse_hom.h:145
double tau_rec_
[ms] time constant for recovery
Definition tsodyks_synapse_hom.h:166
double tau_psc_
[ms] time constant of postsyn current
Definition tsodyks_synapse_hom.h:164
TsodyksHomCommonProperties()
Default constructor.
Definition tsodyks_synapse_hom.cpp:43
double U_
asymptotic value of probability of release
Definition tsodyks_synapse_hom.h:167
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties from the values given in dictionary.
Definition tsodyks_synapse_hom.cpp:64
void get_status(Dictionary &d) const
Get all properties and put them into a dictionary.
Definition tsodyks_synapse_hom.cpp:53
double tau_fac_
[ms] time constant for facilitation
Definition tsodyks_synapse_hom.h:165
Definition tsodyks_synapse_hom.h:230
size_t handles_test_event(SpikeEvent &, size_t) override
Check if the node can handle a particular event and receptor type.
Definition tsodyks_synapse_hom.h:236
Definition tsodyks_synapse_hom.h:175
tsodyks_synapse_hom & operator=(const tsodyks_synapse_hom &)=default
double t_lastspike_
time point of last spike emitted
Definition tsodyks_synapse_hom.h:261
void get_status(Dictionary &d) const
Get all properties of this connection and put them into a dictionary.
Definition tsodyks_synapse_hom.h:335
bool send(Event &e, size_t t, const TsodyksHomCommonProperties &cp)
Send an event to the receiver of this connection.
Definition tsodyks_synapse_hom.h:274
double u_
actual probability of release
Definition tsodyks_synapse_hom.h:260
~tsodyks_synapse_hom()
Default Destructor.
Definition tsodyks_synapse_hom.h:200
Connection< targetidentifierT > ConnectionBase
Definition tsodyks_synapse_hom.h:178
void check_connection(Node &s, Node &t, size_t receptor_type, const CommonPropertiesType &)
Definition tsodyks_synapse_hom.h:243
double y_
amount of resources in active state
Definition tsodyks_synapse_hom.h:259
double x_
amount of resources in recovered state
Definition tsodyks_synapse_hom.h:258
tsodyks_synapse_hom()
Default Constructor.
Definition tsodyks_synapse_hom.h:324
static constexpr ConnectionModelProperties properties
Definition tsodyks_synapse_hom.h:180
tsodyks_synapse_hom(const tsodyks_synapse_hom &)=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 tsodyks_synapse_hom.h:346
TsodyksHomCommonProperties CommonPropertiesType
Definition tsodyks_synapse_hom.h:177
void set_weight(double)
Definition tsodyks_synapse_hom.h:250
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
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_tsodyks_synapse_hom(const std::string &name)
Definition tsodyks_synapse_hom.cpp:33
ConnectionModelProperties
Definition connector_model.h:49
constexpr size_t invalid_port
Value for invalid connection port number.
Definition nest_types.h:141