MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GraupnerBrunel2012CaPlasticitySynHandler.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2013 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #ifndef _GRAUPNER_BRUNEL_2012_CA_PLASTICITY_SYN_HANDLER_H
11 #define _GRAUPNER_BRUNEL_2012_CA_PLASTICITY_SYN_HANDLER_H
12 
13 #include "../basecode/global.h"
14 #include "../randnum/RNG.h"
15 
16 #include <queue>
17 
18 using namespace std;
19 
20 // see pg 13 of Higgins et al | October 2014 | Volume 10 | Issue 10 | e1003834 | PLOS Comp Biol
21 // tP and tD are times spent above potentiation and depression thresholds
22 // Depending on tP and tD, I return A,B,C factors for weight update (see pg 13 ref above)
23 // A,B,C are used to compute the weight change for one or multiple synapses
24 // A is weight independent, B,D are weight dependent and C,E are accumulated noise
26 {
27  weightFactors() : tP(0.0), tD(0.0), A(0.0), B(0.0), C(0.0), D(0.0), E(0.0) {};
28  double tP; // time spent above potentiation threshold (thetaP) between two events
29  double tD; // time spent between depression and potentiation thresholds between two events
30  double t0; // time spent below depression threshold (thetaD) between two events
31  double A;
32  double B;
33  double C;
34  double D;
35  double E;
36 };
37 
44 {
45 public:
50 
52  // Inherited virtual functions from SynHandlerBase
54  void vSetNumSynapses( unsigned int num );
55  unsigned int vGetNumSynapses() const;
56  Synapse* vGetSynapse( unsigned int i );
57  void vProcess( const Eref& e, ProcPtr p );
58  void vReinit( const Eref& e, ProcPtr p );
60  unsigned int addSynapse();
61  void dropSynapse( unsigned int droppedSynNumber );
62  void addSpike( unsigned int index, double time, double weight );
63  double getTopSpike( unsigned int index ) const;
65  void addPostSpike( const Eref& e, double time );
66 
67  void setCa( double v );
68  double getCa() const;
69  void setCaInit( double v );
70  double getCaInit() const;
71  void setTauCa( double v );
72  double getTauCa() const;
73  void setTauSyn( double v );
74  double getTauSyn() const;
75  void setNoiseSD( double v );
76  double getNoiseSD() const;
77  void setNoisy( bool v );
78  bool getNoisy() const;
79  void setBistable( bool v );
80  bool getBistable() const;
81 
82  void setCaPre( double v );
83  double getCaPre() const;
84  void setCaPost( double v );
85  double getCaPost() const;
86  void setDelayD( double v );
87  double getDelayD() const;
88 
89  void setThetaD( double v );
90  double getThetaD() const;
91  void setThetaP( double v );
92  double getThetaP() const;
93  void setGammaD( double v );
94  double getGammaD() const;
95  void setGammaP( double v );
96  double getGammaP() const;
97 
98  void setWeightMax( double v );
99  double getWeightMax() const;
100  void setWeightMin( double v );
101  double getWeightMin() const;
102  void setWeightScale( double v );
103  double getWeightScale() const;
104 
105  weightFactors updateCaWeightFactors( double currTime );
106  void updateWeight( Synapse* synPtr, weightFactors *wFacPtr );
107 
108  void reinitSeed( );
109 
110  static const Cinfo* initCinfo();
111 
112 private:
113 
114  vector< Synapse > synapses_;
115 
116  priority_queue< PreSynEvent, vector< PreSynEvent >, CompareSynEvent > events_;
117  priority_queue< PreSynEvent, vector< PreSynEvent >, CompareSynEvent > delayDPreEvents_;
118  priority_queue< PostSynEvent, vector< PostSynEvent >, ComparePostSynEvent > postEvents_;
119 
120  double Ca_;
121  double CaInit_;
122  double tauCa_;
123  double tauSyn_;
124  double CaPre_;
125  double CaPost_;
126  double delayD_;
127  bool noisy_;
128  double noiseSD_;
129  bool bistable_;
130  double thetaD_;
131  double thetaP_;
132  double gammaD_;
133  double gammaP_;
134  double weightMax_;
135  double weightMin_;
136  double weightScale_;
138 
139  // NormalRng normalGenerator_;
140  unsigned long seed_;
144 
145 };
146 
147 #endif // _GRAUPNER_BRUNEL_2012_CA_PLASTICITY_SYN_HANDLER_H
std::mersenne_twister_engine< std::uint_fast32_t, 32, 624, 397, 31, 0x9908b0df, 11, 0xffffffff, 7, 0x9d2c5680, 15, 0xefc60000, 18, 1812433253 > MOOSE_RNG_DEFAULT_ENGINE
Definition: Definitions.h:42
priority_queue< PreSynEvent, vector< PreSynEvent >, CompareSynEvent > delayDPreEvents_
priority_queue< PreSynEvent, vector< PreSynEvent >, CompareSynEvent > events_
Definition: Eref.h:26
priority_queue< PostSynEvent, vector< PostSynEvent >, ComparePostSynEvent > postEvents_
std::random_device MOOSE_RANDOM_DEVICE
Definition: Definitions.h:29
Definition: Cinfo.h:18