HomeostaticSynapse.h

Go to the documentation of this file.
00001 #ifndef HOMEOSTATICSYNAPSE_H_
00002 #define HOMEOSTATICSYNAPSE_H_
00003 
00004 #include <string>
00005 using std::string;
00006 #include <boost/format.hpp>
00007 
00008 #include "PCSIMException.h"
00009 #include "SpikeBuffer.h"
00010 #include "SimObject.h"
00011 #include "SimNetwork.h"
00012 
00013 #include "GenericStaticSpikingSynapse.h"
00014 #include "GenericDynamicSpikingSynapse.h"
00015 #include "GenericConductanceBasedSpikingSynapse.h"
00016 #include "GenericCurrentBasedSpikingSynapse.h"
00017 #include "GenericHomeostaticSynapse.h"
00018 #include "GenericGlutamateSynapse.h"
00019 
00020 #include "ExponentialDecaySpikeResponse.h"
00021 
00023 // CONDUCTANCE BASED
00025 
00026 class DynamicHomeostaticSynapse : public GenericHomeostaticSynapse<
00027                                          GenericDynamicSpikingSynapse< 
00028                                          GenericConductanceBasedSpikingSynapse< 
00029                                          ExponentialDecaySpikeResponse > > >
00030 {
00031     SIMOBJECT(DynamicHomeostaticSynapse, AdvancePhase::SpikeDriven)
00032 
00033 public:
00034     DynamicHomeostaticSynapse(
00035         const float Winit          = 1e-9,
00036         const float tau            = 5e-3,
00037         const float delay          = 2e-4,
00038         const float Erev           = 0e-3,
00039         const float U              = 0.2,
00040         const float D              = 0.1,
00041         const float F              = 0.4,
00042         const float u0             = 0.2,
00043         const float r0             = 1.0,
00044         const float f0             = -1.0,
00045         const double alpha         = 0.01,
00046         const double activity_tau  = 10.0,
00047         const double activity_goal = 1.5,
00048         const double activity_init = 1.0,
00049         const double Wex           = 10e-9,
00050         const double back_delay    = 0.0,
00051         const bool active          = true
00052         )
00053     {
00054         this->Winit = Winit;
00055         this->tau = tau;
00056         this->delay = delay;
00057         this->Erev = Erev;
00058 
00059         this->U  = U;
00060         this->D  = D;
00061         this->F  = F;
00062         this->u0 = u0;
00063         this->r0 = r0;
00064         this->f0 = f0;
00065 
00066         this->alpha = alpha;
00067         this->Wex=Wex;
00068         this->active=active;
00069         this->inhibitory=(Erev < -20e-3);
00070 
00071         this->activity_tau = activity_tau;
00072         this->activity_goal = activity_goal;
00073         this->activity_init = activity_init;
00074         this->back_delay = back_delay;
00075     };
00076 };
00077 
00078 
00079 class StaticHomeostaticSynapse : public GenericHomeostaticSynapse<
00080                                         GenericStaticSpikingSynapse< 
00081                                         GenericConductanceBasedSpikingSynapse<
00082                                         ExponentialDecaySpikeResponse > > >
00083 {
00084     SIMOBJECT(StaticHomeostaticSynapse, AdvancePhase::SpikeDriven)
00085 
00086 public:
00087     StaticHomeostaticSynapse(
00088         const float Winit          = 1e-9,
00089         const float tau            = 5e-3,
00090         const float delay          = 2e-4,
00091         const float Erev           = 0e-3,
00092         const double alpha         = 0.01,
00093         const double activity_tau  = 10.0,
00094         const double activity_goal = 1.5,
00095         const double activity_init = 1.0,
00096         const double Wex           = 10e-9,
00097         const double back_delay    = 0.0,
00098         const bool active          = true
00099         )
00100     {
00101         this->Winit = Winit;
00102         this->tau = tau;
00103         this->delay = delay;
00104         this->Erev = Erev;
00105 
00106         this->alpha = alpha;
00107         this->Wex=Wex;
00108         this->active=active;
00109         this->inhibitory=(Erev < -20e-3);
00110 
00111         this->activity_tau = activity_tau;
00112         this->activity_goal = activity_goal;
00113         this->activity_init = activity_init;
00114         this->back_delay = back_delay;
00115     };
00116 };
00117 
00118 
00119 
00120 
00122 // CURRENT BASED
00124 
00125 class DynamicHomeostaticCurrentSynapse : public GenericHomeostaticSynapse<
00126                                                 GenericDynamicSpikingSynapse< 
00127                                                 GenericCurrentBasedSpikingSynapse< 
00128                                                 ExponentialDecaySpikeResponse > > >
00129 {
00130     SIMOBJECT(DynamicHomeostaticCurrentSynapse, AdvancePhase::SpikeDriven)
00131 
00132 public:
00133     DynamicHomeostaticCurrentSynapse(
00134         const float Winit          = 1e-9,
00135         const float tau            = 5e-3,
00136         const float delay          = 2e-4,
00137         const float U              = 0.2,
00138         const float D              = 0.1,
00139         const float F              = 0.4,
00140         const float u0             = 0.2,
00141         const float r0             = 1.0,
00142         const float f0             = -1.0,
00143         const double alpha         = 0.01,
00144         const double activity_tau  = 10.0,
00145         const double activity_goal = 1.5,
00146         const double activity_init = 1.0,
00147         const double Wex           = 10e-9,
00148         const double back_delay    = 0.0,
00149         const bool active          = true
00150         )
00151     {
00152         this->Winit = Winit;
00153         this->tau = tau;
00154         this->delay = delay;
00155 
00156         this->U  = U;
00157         this->D  = D;
00158         this->F  = F;
00159         this->u0 = u0;
00160         this->r0 = r0;
00161         this->f0 = f0;
00162 
00163         this->alpha = alpha;
00164         this->Wex=Wex;
00165         this->active=active;
00166         this->inhibitory=(Winit < 0.0);
00167 
00168         this->activity_tau = activity_tau;
00169         this->activity_goal = activity_goal;
00170         this->activity_init = activity_init;
00171         this->back_delay = back_delay;
00172     };
00173 };
00174 
00175 
00176 class StaticHomeostaticCurrentSynapse : public GenericHomeostaticSynapse<
00177                                                GenericStaticSpikingSynapse< 
00178                                                GenericCurrentBasedSpikingSynapse<
00179                                                ExponentialDecaySpikeResponse > > >
00180 {
00181     SIMOBJECT(StaticHomeostaticCurrentSynapse, AdvancePhase::SpikeDriven)
00182 
00183 public:
00184     StaticHomeostaticCurrentSynapse(
00185         const float Winit          = 1e-9,
00186         const float tau            = 5e-3,
00187         const float delay          = 2e-4,
00188         const double alpha         = 0.01,
00189         const double activity_tau  = 10.0,
00190         const double activity_goal = 1.5,
00191         const double activity_init = 1.0,
00192         const double Wex           = 10e-9,
00193         const double back_delay    = 0.0,
00194         const bool active          = true
00195         )
00196     {
00197         this->Winit = Winit;
00198         this->tau = tau;
00199         this->delay = delay;
00200 
00201         this->alpha = alpha;
00202         this->Wex=Wex;
00203         this->active=active;
00204         this->inhibitory=(Winit < 0.0);
00205 
00206         this->activity_tau = activity_tau;
00207         this->activity_goal = activity_goal;
00208         this->activity_init = activity_init;
00209         this->back_delay = back_delay;
00210     };
00211 };
00212 
00213 
00214 
00215 typedef GenericHomeostaticSynapse<
00216         GenericDynamicSpikingSynapse< 
00217         GenericGlutamateSynapse< 
00218         ExponentialDecaySpikeResponse > > > HomDynGlutamateExpBase;
00219 
00220 class HomDynGlutamateExpSynapse : public GenericHomeostaticSynapse<
00221                                          GenericDynamicSpikingSynapse<
00222                                          GenericGlutamateSynapse<
00223                                          ExponentialDecaySpikeResponse > > >
00224 {
00225     SIMOBJECT(HomDynGlutamateExpSynapse, AdvancePhase::SpikeDriven)
00226 
00227 public:
00228     HomDynGlutamateExpSynapse(
00229         const float Winit     = 1e-9,
00230         const float tau_AMPA  = 5e-3,
00231         const float tau_NMDA  = 150e-3,
00232         const float delay     = 2e-4,
00233         const float Erev_AMPA = 0e-3,
00234         const float Erev_NMDA = 0e-3,
00235         const float fract_NMDA= 0.5,
00236         const float U         = 0.2,
00237         const float D         = 0.1,
00238         const float F         = 0.4,
00239         const float u0        = 0.2,
00240         const float r0        = 1.0,
00241         const float f0        = -1.0,
00242         const double alpha         = 0.01,
00243         const double activity_tau  = 10.0,
00244         const double activity_goal = 1.5,
00245         const double activity_init = 1.0,
00246         const double Wex           = 10e-9
00247        )
00248     {
00249         this->Winit = Winit;
00250         this->Mg_conc = 1e-3;
00251         this->delay = delay;
00252 
00253         this->tau_NMDA = tau_NMDA;
00254         this->tau_AMPA = tau_AMPA;
00255 
00256         this->tau = tau_NMDA;
00257         this->resp_AMPA.tau = tau_AMPA;
00258 
00259         this->Erev_NMDA = Erev_NMDA;
00260         this->Erev_AMPA = Erev_AMPA;
00261 
00262         this->fract_NMDA = fract_NMDA;
00263 
00264         this->U  = U;
00265         this->D  = D;
00266         this->F  = F;
00267         this->u0 = u0;
00268         this->r0 = r0;
00269         this->f0 = f0;
00270 
00271         this->rescale = false;
00272         this->inhibitory=false;
00273         this->active=true;
00274         this->back_delay = 0.0;
00275 
00276         this->alpha = alpha;
00277         this->Wex=Wex;
00278 
00279         this->activity_tau = activity_tau;
00280         this->activity_goal = activity_goal;
00281         this->activity_init = activity_init;
00282     };
00283 
00285     double tau_AMPA;
00286 
00288     double tau_NMDA;
00289 
00291     bool rescale;
00292 
00294     virtual int reset(double dt)
00295     {
00296         tau = tau_NMDA;
00297         resp_AMPA.tau = tau_AMPA;
00298 
00299         if(rescale)
00300             scale_NMDA = tau_AMPA/tau_NMDA;
00301         else
00302             scale_NMDA = 1.0;
00303 
00304         resp_AMPA.reset(dt);
00305         return HomDynGlutamateExpBase::reset(dt);
00306     }
00307 };
00308 
00309 #endif /*GENERICHOMEOSTATICSYNAPSE_H_*/

Generated on Wed Jul 9 16:34:39 2008 for PCSIM by  doxygen 1.5.5