00001
00005 #ifndef _GABASYNAPSE_H_
00006 #define _GABASYNAPSE_H_
00007
00008 #include "GenericGABASynapse.h"
00009 #include "GenericNonLinGABASynapse.h"
00010 #include "GABA_BResponse.h"
00011
00012 #include "GenericDynamicSpikingSynapse.h"
00013 #include "GenericStaticSpikingSynapse.h"
00014
00015 #include "ExponentialDecaySpikeResponse.h"
00016 #include "DoubleExponentialSpikeResponse.h"
00017 #include "AlphaFunctionSpikeResponse.h"
00018
00020
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 typedef GenericDynamicSpikingSynapse<
00040 GenericNonLinGABASynapse<
00041 ExponentialDecaySpikeResponse > > DynamicNonLinGABAExpBase;
00042
00043 class DynamicNonLinGABAExpSynapse : public GenericDynamicSpikingSynapse<
00044 GenericNonLinGABASynapse<
00045 ExponentialDecaySpikeResponse > >
00046 {
00047 SIMOBJECT(DynamicNonLinGABAExpSynapse, AdvancePhase::SpikeDriven)
00048
00049 public:
00050 DynamicNonLinGABAExpSynapse(
00051 const float W = 1e-9,
00052 const float WB = 0.06e-9,
00053 const float tau_A = 6e-3,
00054 const float delay = 2e-4,
00055 const float Erev_A =-70e-3,
00056 const float Erev_B =-95e-3,
00057 const float U = 0.2,
00058 const float D = 0.1,
00059 const float F = 0.4,
00060 const float u0 = 0.2,
00061 const float r0 = 1.0,
00062 const float f0 =-1.0,
00063 const float k1 = 0.09*10e6,
00064 const float k2 = 1.2,
00065 const float k3 = 180.0,
00066 const float k4 = 34.0,
00067 const float kd = 100.0,
00068 const float Cdur = 0.5e-3,
00069 const float Cmax = 1.0e-3,
00070 const float dead_time = 1e-3,
00071 const int n = 4,
00072 const float fract_B = -1.0
00073
00074 )
00075 {
00076 this->W = W;
00077 this->delay = delay;
00078
00079 this->g_max = WB;
00080 this->k1=k1;
00081 this->k2=k2;
00082 this->k3=k3;
00083 this->k4=k4;
00084 this->kd=kd;
00085 this->dead_time=dead_time;
00086 this->Cmax=Cmax;
00087 this->Cdur=Cdur;
00088 this->n=n;
00089 this->fract_B = fract_B;
00090
00091 this->tau_A = tau_A;
00092 this->resp_A.tau = tau_A;
00093
00094 this->Erev_A = Erev_A;
00095 this->Erev_B = Erev_B;
00096
00097 this->U = U;
00098 this->D = D;
00099 this->F = F;
00100 this->u0 = u0;
00101 this->r0 = r0;
00102 this->f0 = f0;
00103
00104
00105 };
00106
00108 double tau_A;
00109
00111 double fract_B;
00112
00114 virtual int reset(double dt)
00115 {
00116 resp_A.tau = tau_A;
00117 resp_A.reset(dt);
00118
00119 if (fract_B >= 0.0)
00120 g_max = W*fract_B;
00121
00122 return DynamicNonLinGABAExpBase::reset(dt);
00123 }
00124 };
00125
00126
00127 typedef GenericStaticSpikingSynapse<
00128 GenericNonLinGABASynapse<
00129 ExponentialDecaySpikeResponse > > StaticNonLinGABAExpBase;
00130
00131 class StaticNonLinGABAExpSynapse : public GenericStaticSpikingSynapse<
00132 GenericNonLinGABASynapse<
00133 ExponentialDecaySpikeResponse > >
00134 {
00135 SIMOBJECT(StaticNonLinGABAExpSynapse, AdvancePhase::SpikeDriven)
00136
00137 public:
00138 StaticNonLinGABAExpSynapse(
00139 const float W = 1e-9,
00140 const float WB = 0.06e-9,
00141 const float tau_A = 6e-3,
00142 const float delay = 2e-4,
00143 const float Erev_A = -70e-3,
00144 const float Erev_B = -90e-3,
00145 const float k1 = 0.09*10e6,
00146 const float k2 = 1.2,
00147 const float k3 = 180.0,
00148 const float k4 = 34.0,
00149 const float kd = 100.0,
00150 const float Cdur = 0.5e-3,
00151 const float Cmax = 1.0e-3,
00152 const float dead_time = 1e-3,
00153 const int n = 4,
00154 const float fract_B = -1.0
00155
00156 )
00157 {
00158 this->W = W;
00159 this->delay = delay;
00160
00161 this->tau_A = tau_A;
00162 this->resp_A.tau = tau_A;
00163
00164 this->g_max = WB;
00165 this->k1=k1;
00166 this->k2=k2;
00167 this->k3=k3;
00168 this->k4=k4;
00169 this->kd=kd;
00170 this->dead_time=dead_time;
00171 this->Cmax=Cmax;
00172 this->Cdur=Cdur;
00173 this->n=n;
00174 this->fract_B = fract_B;
00175
00176 this->Erev_A = Erev_A;
00177 this->Erev_B = Erev_B;
00178
00179
00180 };
00181
00183 double tau_A;
00184
00186 double fract_B;
00187
00189 virtual int reset(double dt)
00190 {
00191 resp_A.tau = tau_A;
00192 resp_A.reset(dt);
00193
00194 if (fract_B >= 0.0)
00195 g_max = W*fract_B;
00196
00197 return StaticNonLinGABAExpBase::reset(dt);
00198 }
00199 };
00200
00203
00206
00207
00209
00210 typedef GenericDynamicSpikingSynapse< GenericGABASynapse< ExponentialDecaySpikeResponse > > DynamicGABAExpBase;
00211
00212 class DynamicGABAExpSynapse : public GenericDynamicSpikingSynapse<
00213 GenericGABASynapse<
00214 ExponentialDecaySpikeResponse > >
00215 {
00216 SIMOBJECT(DynamicGABAExpSynapse, AdvancePhase::SpikeDriven)
00217
00218 public:
00219 DynamicGABAExpSynapse(
00220 const float W = 1e-9,
00221 const float tau_A = 6e-3,
00222 const float tau_B = 150e-3,
00223 const float delay = 2e-4,
00224 const float Erev_A =-70e-3,
00225 const float Erev_B =-90e-3,
00226 const float fract_A = 0.5,
00227 const float U = 0.2,
00228 const float D = 0.1,
00229 const float F = 0.4,
00230 const float u0 = 0.2,
00231 const float r0 = 1.0,
00232 const float f0 =-1.0,
00233 const bool rescale = true)
00234 {
00235 this->W = W;
00236 this->delay = delay;
00237
00238 this->tau_A = tau_A;
00239 this->tau_B = tau_B;
00240
00241 this->tau = tau_B;
00242 this->resp_A.tau = tau_A;
00243
00244 this->Erev_A = Erev_A;
00245 this->Erev_B = Erev_B;
00246
00247 this->fract_A = fract_A;
00248
00249 this->U = U;
00250 this->D = D;
00251 this->F = F;
00252 this->u0 = u0;
00253 this->r0 = r0;
00254 this->f0 = f0;
00255
00256 this->rescale = rescale;
00257 };
00258
00260 double tau_A;
00261
00263 double tau_B;
00264
00266 bool rescale;
00267
00269 virtual int reset(double dt)
00270 {
00271 tau = tau_B;
00272 resp_A.tau = tau_A;
00273
00274 if(rescale)
00275 scale_B = tau_A/tau_B;
00276 else
00277 scale_B = 1.0;
00278
00279 resp_A.reset(dt);
00280 return DynamicGABAExpBase::reset(dt);
00281 }
00282 };
00283
00284
00285
00287
00288 typedef GenericDynamicSpikingSynapse< GenericGABASynapse< DoubleExponentialSpikeResponse > >
00289 DynamicGABADoubleExpBase;
00290
00291 class DynamicGABADoubleExpSynapse : public GenericDynamicSpikingSynapse<
00292 GenericGABASynapse<
00293 DoubleExponentialSpikeResponse > >
00294 {
00295 SIMOBJECT(DynamicGABADoubleExpSynapse, AdvancePhase::SpikeDriven)
00296
00297 public:
00298 DynamicGABADoubleExpSynapse(
00299 const float W = 1e-9,
00300 const float tau1_A = 0.1e-3,
00301 const float tau2_A = 6e-3,
00302 const float tau1_B = 0.1e-3,
00303 const float tau2_B = 150e-3,
00304 const float delay = 2e-4,
00305 const float Erev_A =-70e-3,
00306 const float Erev_B =-90e-3,
00307 const float fract_A = 0.5,
00308 const float U = 0.2,
00309 const float D = 0.1,
00310 const float F = 0.4,
00311 const float u0 = 0.2,
00312 const float r0 = 1.0,
00313 const float f0 =-1.0,
00314 const bool rescale = true)
00315 {
00316 this->W=W;
00317 this->delay=delay;
00318
00319 this->tau1_A = tau1_A;
00320 this->tau2_A = tau2_A;
00321 this->tau1_B = tau1_B;
00322 this->tau2_B = tau2_B;
00323
00324 this->tau1 = tau1_B;
00325 this->tau2 = tau2_B;
00326 this->resp_A.tau1 = tau1_A;
00327 this->resp_A.tau2 = tau2_A;
00328
00329 this->Erev_A = Erev_A;
00330 this->Erev_B = Erev_B;
00331
00332 this->fract_A = fract_A;
00333
00334 this->U = U;
00335 this->D = D;
00336 this->F = F;
00337 this->u0 = u0;
00338 this->r0 = r0;
00339 this->f0 = f0;
00340
00341 this->rescale = rescale;
00342 };
00343
00345 double tau1_A;
00346
00348 double tau2_A;
00349
00351 double tau1_B;
00352
00354 double tau2_B;
00355
00357 bool rescale;
00358
00360 virtual int reset(double dt)
00361 {
00362 tau1 = tau1_B;
00363 tau2 = tau2_B;
00364 resp_A.tau1 = tau1_A;
00365 resp_A.tau2 = tau2_A;
00366
00367 if(rescale)
00368 scale_B = (tau1_A+tau2_A)/(tau1_B+tau2_B);
00369 else
00370 scale_B = 1.0;
00371
00372 resp_A.reset(dt);
00373 return DynamicGABADoubleExpBase::reset(dt);
00374 }
00375 };
00376
00377
00378
00379
00381
00382 typedef GenericDynamicSpikingSynapse< GenericGABASynapse< AlphaFunctionSpikeResponse > >
00383 DynamicGABAAlphaBase;
00384
00385 class DynamicGABAAlphaSynapse : public GenericDynamicSpikingSynapse< GenericGABASynapse< AlphaFunctionSpikeResponse > >
00386 {
00387 SIMOBJECT(DynamicGABAAlphaSynapse, AdvancePhase::SpikeDriven)
00388
00389 public:
00390 DynamicGABAAlphaSynapse(
00391 const float W = 1e-9,
00392 const float tau_A = 6e-3,
00393 const float tau_B = 150e-3,
00394 const float delay = 2e-4,
00395 const float Erev_A = -70e-3,
00396 const float Erev_B = -90e-3,
00397 const float fract_A = 0.5,
00398 const float U = 0.2,
00399 const float D = 0.1,
00400 const float F = 0.4,
00401 const float u0 = 0.2,
00402 const float r0 = 1.0,
00403 const float f0 = -1.0,
00404 const bool rescale = true)
00405 {
00406 this->W = W;
00407 this->delay = delay;
00408
00409 this->tau_A = tau_A;
00410 this->tau_B = tau_B;
00411
00412 this->tau = tau_B;
00413 this->resp_A.tau = tau_A;
00414
00415 this->Erev_A = Erev_A;
00416 this->Erev_B = Erev_B;
00417
00418 this->fract_A = fract_A;
00419
00420 this->U = U;
00421 this->D = D;
00422 this->F = F;
00423 this->u0 = u0;
00424 this->r0 = r0;
00425 this->f0 = f0;
00426
00427 this->rescale = rescale;
00428 };
00429
00431 double tau_A;
00432
00434 double tau_B;
00435
00437 bool rescale;
00438
00440 virtual int reset(double dt)
00441 {
00442 tau = tau_B;
00443 resp_A.tau = tau_A;
00444
00445 if(rescale)
00446 scale_B = tau_A/tau_B;
00447 else
00448 scale_B = 1.0;
00449
00450 resp_A.reset(dt);
00451 return DynamicGABAAlphaBase::reset(dt);
00452 }
00453 };
00454
00455
00456
00459
00462
00463
00465
00466 typedef GenericStaticSpikingSynapse< GenericGABASynapse< ExponentialDecaySpikeResponse > > StaticGABAExpBase;
00467
00468 class StaticGABAExpSynapse : public GenericStaticSpikingSynapse< GenericGABASynapse< ExponentialDecaySpikeResponse > >
00469 {
00470 SIMOBJECT(StaticGABAExpSynapse, AdvancePhase::SpikeDriven)
00471
00472 public:
00473 StaticGABAExpSynapse(
00474 const float W = 1e-9,
00475 const float tau_A = 6e-3,
00476 const float tau_B = 150e-3,
00477 const float delay = 2e-4,
00478 const float Erev_A =-70e-3,
00479 const float Erev_B =-90e-3,
00480 const float fract_A = 0.5,
00481 const bool rescale = true)
00482 {
00483 this->W = W;
00484 this->delay = delay;
00485
00486 this->tau_A = tau_A;
00487 this->tau_B = tau_B;
00488
00489 this->tau = tau_B;
00490 this->resp_A.tau = tau_A;
00491
00492 this->Erev_A = Erev_A;
00493 this->Erev_B = Erev_B;
00494
00495 this->fract_A = fract_A;
00496
00497 this->rescale = rescale;
00498 };
00499
00501 double tau_A;
00502
00504 double tau_B;
00505
00507 bool rescale;
00508
00510 virtual int reset(double dt)
00511 {
00512 tau = tau_B;
00513 resp_A.tau = tau_A;
00514
00515 if(rescale)
00516 scale_B = tau_A/tau_B;
00517 else
00518 scale_B = 1.0;
00519
00520 resp_A.reset(dt);
00521 return StaticGABAExpBase::reset(dt);
00522 }
00523 };
00524
00525
00526
00528
00529 typedef GenericStaticSpikingSynapse< GenericGABASynapse< DoubleExponentialSpikeResponse > >
00530 StaticGABADoubleExpBase;
00531
00532 class StaticGABADoubleExpSynapse : public GenericStaticSpikingSynapse< GenericGABASynapse< DoubleExponentialSpikeResponse > >
00533 {
00534 SIMOBJECT(StaticGABADoubleExpSynapse, AdvancePhase::SpikeDriven)
00535
00536 public:
00537 StaticGABADoubleExpSynapse(
00538 const float W = 1e-9,
00539 const float tau1_A = 0.1e-3,
00540 const float tau2_A = 6e-3,
00541 const float tau1_B = 0.1e-3,
00542 const float tau2_B = 150e-3,
00543 const float delay = 2e-4,
00544 const float Erev_A =-70e-3,
00545 const float Erev_B =-90e-3,
00546 const float fract_A = 0.5,
00547 const bool rescale = true)
00548 {
00549 this->W=W;
00550 this->delay=delay;
00551
00552 this->tau1_A = tau1_A;
00553 this->tau2_A = tau2_A;
00554 this->tau1_B = tau1_B;
00555 this->tau2_B = tau2_B;
00556
00557 this->tau1 = tau1_B;
00558 this->tau2 = tau2_B;
00559 this->resp_A.tau1 = tau1_A;
00560 this->resp_A.tau2 = tau2_A;
00561
00562 this->Erev_A = Erev_A;
00563 this->Erev_B = Erev_B;
00564
00565 this->fract_A = fract_A;
00566
00567 this->rescale = rescale;
00568 };
00569
00571 double tau1_A;
00572
00574 double tau2_A;
00575
00577 double tau1_B;
00578
00580 double tau2_B;
00581
00583 bool rescale;
00584
00586 virtual int reset(double dt)
00587 {
00588 tau1 = tau1_B;
00589 tau2 = tau2_B;
00590 resp_A.tau1 = tau1_A;
00591 resp_A.tau2 = tau2_A;
00592
00593 if(rescale)
00594 scale_B = (tau1_A+tau2_A)/(tau1_B+tau2_B);
00595 else
00596 scale_B = 1.0;
00597
00598 resp_A.reset(dt);
00599 return StaticGABADoubleExpBase::reset(dt);
00600 }
00601 };
00602
00603
00604
00605
00607
00608 typedef GenericStaticSpikingSynapse< GenericGABASynapse< AlphaFunctionSpikeResponse > >
00609 StaticGABAAlphaBase;
00610
00611 class StaticGABAAlphaSynapse : public GenericStaticSpikingSynapse< GenericGABASynapse< AlphaFunctionSpikeResponse > >
00612 {
00613 SIMOBJECT(StaticGABAAlphaSynapse, AdvancePhase::SpikeDriven)
00614
00615 public:
00616 StaticGABAAlphaSynapse(
00617 const float W = 1e-9,
00618 const float tau_A = 6e-3,
00619 const float tau_B = 150e-3,
00620 const float delay = 2e-4,
00621 const float Erev_A =-70e-3,
00622 const float Erev_B =-90e-3,
00623 const float fract_A = 0.5,
00624 const bool rescale = true)
00625 {
00626 this->W = W;
00627 this->delay = delay;
00628
00629 this->tau_A = tau_A;
00630 this->tau_B = tau_B;
00631
00632 this->tau = tau_B;
00633 this->resp_A.tau = tau_A;
00634
00635 this->Erev_A = Erev_A;
00636 this->Erev_B = Erev_B;
00637
00638 this->fract_A = fract_A;
00639
00640 this->rescale = rescale;
00641 };
00642
00644 double tau_A;
00645
00647 double tau_B;
00648
00650 bool rescale;
00651
00653 virtual int reset(double dt)
00654 {
00655 tau = tau_B;
00656 resp_A.tau = tau_A;
00657
00658 if(rescale)
00659 scale_B = tau_A/tau_B;
00660 else
00661 scale_B = 1.0;
00662
00663 resp_A.reset(dt);
00664 return StaticGABAAlphaBase::reset(dt);
00665 }
00666 };
00667
00668 #endif //_GABASYNAPSE_H_