23#ifndef TSODYKS_SYNAPSE_H
24#define TSODYKS_SYNAPSE_H
139template <
typename target
identifierT >
234template <
typename target
identifierT >
242template <
typename target
identifierT >
246 const double t_spike = e.get_stamp().get_ms();
247 const double h = t_spike - t_lastspike_;
249 Node* target = get_target( t );
257 double Puu = ( tau_fac_ == 0.0 ) ? 0.0 : std::exp( -h / tau_fac_ );
258 double Pyy = std::exp( -h / tau_psc_ );
259 double Pzz = std::expm1( -h / tau_rec_ );
260 double Pxy = ( Pzz * tau_rec_ - ( Pyy - 1.0 ) * tau_psc_ ) / ( tau_psc_ - tau_rec_ );
262 double z = 1.0 - x_ - y_;
268 x_ += Pxy * y_ - Pzz * z;
272 u_ += U_ * ( 1.0 - u_ );
275 double delta_y_tsp = u_ * x_;
282 e.set_receiver( *target );
283 e.set_weight( delta_y_tsp * weight_ );
284 e.set_delay_steps( get_delay_steps() );
285 e.set_rport( get_rport() );
288 t_lastspike_ = t_spike;
293template <
typename target
identifierT >
304 , t_lastspike_( 0.0 )
308template <
typename target
identifierT >
312 ConnectionBase::get_status( d );
324template <
typename target
identifierT >
344 ConnectionBase::set_status( d, cm );
348 if ( U_ > 1.0 or U_ < 0.0 )
354 if ( tau_psc_ <= 0.0 )
360 if ( tau_rec_ <= 0.0 )
366 if ( tau_fac_ < 0.0 )
372 if ( u_ > 1.0 or u_ < 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 tsodyks_synapse.h:197
size_t handles_test_event(SpikeEvent &, size_t) override
Check if the node can handle a particular event and receptor type.
Definition tsodyks_synapse.h:203
Definition tsodyks_synapse.h:141
double tau_psc_
[ms] time constant of postsyn current
Definition tsodyks_synapse.h:224
CommonSynapseProperties CommonPropertiesType
Definition tsodyks_synapse.h:143
tsodyks_synapse & operator=(const tsodyks_synapse &)=default
double u_
actual probability of release
Definition tsodyks_synapse.h:230
double t_lastspike_
time point of last spike emitted
Definition tsodyks_synapse.h:231
double tau_rec_
[ms] time constant for recovery
Definition tsodyks_synapse.h:226
static constexpr ConnectionModelProperties properties
Definition tsodyks_synapse.h:146
void get_status(Dictionary &d) const
Get all properties of this connection and put them into a dictionary.
Definition tsodyks_synapse.h:310
double weight_
Definition tsodyks_synapse.h:223
double U_
asymptotic value of probability of release
Definition tsodyks_synapse.h:227
double x_
amount of resources in recovered state
Definition tsodyks_synapse.h:228
tsodyks_synapse(const tsodyks_synapse &)=default
Copy constructor from a property object.
double tau_fac_
[ms] time constant for facilitation
Definition tsodyks_synapse.h:225
void check_connection(Node &s, Node &t, size_t receptor_type, const CommonPropertiesType &)
Definition tsodyks_synapse.h:210
double y_
amount of resources in active state
Definition tsodyks_synapse.h:229
Connection< targetidentifierT > ConnectionBase
Definition tsodyks_synapse.h:144
bool send(Event &e, size_t t, const CommonSynapseProperties &cp)
Send an event to the receiver of this connection.
Definition tsodyks_synapse.h:244
tsodyks_synapse()
Default Constructor.
Definition tsodyks_synapse.h:294
~tsodyks_synapse()
Default Destructor.
Definition tsodyks_synapse.h:166
void set_weight(double w)
Definition tsodyks_synapse.h:217
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties of this connection from the values given in dictionary.
Definition tsodyks_synapse.h:326
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 weight("weight")
const std::string size_of("sizeof")
const std::string tau_psc("tau_psc")
const std::string tau_rec("tau_rec")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_tsodyks_synapse(const std::string &name)
Definition tsodyks_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