NEST main@f146f75
Loading...
Searching...
No Matches
quantal_stp_synapse_impl.h
Go to the documentation of this file.
1/*
2 * quantal_stp_synapse_impl.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 QUANTAL_STP_SYNAPSE_IMPL_H
24#define QUANTAL_STP_SYNAPSE_IMPL_H
25
26#include "quantal_stp_synapse.h"
27
28// Includes from nestkernel:
29#include "connection.h"
30#include "connector_model.h"
31#include "nest_names.h"
32
33namespace nest
34{
35
36template < typename targetidentifierT >
39 , weight_( 1.0 )
40 , U_( 0.5 )
41 , u_( U_ )
42 , tau_rec_( 800.0 )
43 , tau_fac_( 0.0 )
44 , n_( 1 )
45 , a_( n_ )
46 , t_lastspike_( -1.0 )
47{
48}
49
50template < typename targetidentifierT >
51void
63
64
65template < typename targetidentifierT >
66void
68{
70
71 d.update_value( names::weight, weight_ );
72
73 d.update_value( names::dU, U_ );
74 d.update_value( names::u, u_ );
75 d.update_value( names::tau_rec, tau_rec_ );
76 d.update_value( names::tau_fac, tau_fac_ );
77 d.update_integer_value( names::n, n_ );
78 d.update_integer_value( names::a, a_ );
79
80 if ( U_ > 1.0 or U_ < 0.0 )
81 {
82 throw BadProperty( "'U' must be in [0,1]." );
83 }
84
85 if ( u_ > 1.0 or u_ < 0.0 )
86 {
87 throw BadProperty( "'u' must be in [0,1]." );
88 }
89
90 if ( tau_rec_ <= 0.0 )
91 {
92 throw BadProperty( "'tau_rec' must be > 0." );
93 }
94
95 if ( tau_fac_ < 0.0 )
96 {
97 throw BadProperty( "'tau_fac' must be >= 0." );
98 }
99}
100
101} // of namespace nest
102
103#endif // #ifndef QUANTAL_STP_SYNAPSE_IMPL_H
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
void set_status(const Dictionary &d, ConnectorModel &cm)
Definition connector_model.h:69
double t_lastspike_
Time point of last spike emitted.
Definition quantal_stp_synapse.h:185
Connection< targetidentifierT, TotalDelay > ConnectionBase
Definition quantal_stp_synapse.h:106
void get_status(Dictionary &d) const
Get all properties of this connection and put them into a dictionary.
Definition quantal_stp_synapse_impl.h:52
double tau_fac_
[ms] time constant for facilitation (F)
Definition quantal_stp_synapse.h:182
double tau_rec_
[ms] time constant for recovery from depression (D)
Definition quantal_stp_synapse.h:181
double u_
dynamic value of probability of release
Definition quantal_stp_synapse.h:180
double weight_
synaptic weight
Definition quantal_stp_synapse.h:178
quantal_stp_synapse()
Default Constructor.
Definition quantal_stp_synapse_impl.h:37
double U_
unit increment of a facilitating synapse (U)
Definition quantal_stp_synapse.h:179
int a_
Number of available release sites.
Definition quantal_stp_synapse.h:184
void set_status(const Dictionary &d, ConnectorModel &cm)
Set default properties of this connection from the values given in dictionary.
Definition quantal_stp_synapse_impl.h:67
int n_
Number of release sites.
Definition quantal_stp_synapse.h:183
const std::string u("u")
const std::string tau_fac("tau_fac")
const std::string n("n")
const std::string a("a")
const std::string dU("U")
const std::string weight("weight")
const std::string tau_rec("tau_rec")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33