Nov 9, 2015
Updated the code with correct license.
|
|
|
3 |
* |
|
4 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|
5 |
* of this software and associated documentation files (the "Software"), to deal |
|
6 |
* in the Software without restriction, including without limitation the rights |
|
7 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
8 |
* copies of the Software, and to permit persons to whom the Software is |
|
9 |
* furnished to do so, subject to the following conditions: |
|
10 |
* |
Sep 13, 2016
Major cleanup and moderinization
|
|
|
139 |
extern const double dt; |
|
140 |
Vp [N+1] = Vp [0] + A[N] * dt*(-(I_L_p(N) + I_ep(N) + I_gp(N))/tau_p - I_KNa(N)); |
|
141 |
Vi [N+1] = Vi [0] + A[N] * dt*(-(I_L_i(N) + I_ei(N) + I_gi(N))/tau_i); |
|
142 |
Na [N+1] = Na [0] + A[N] * dt*(alpha_Na * get_Qp(N) - Na_pump(N))/tau_Na; |
|
143 |
s_ep[N+1] = s_ep[0] + A[N] * dt*(x_ep[N]); |
|
144 |
s_ei[N+1] = s_ei[0] + A[N] * dt*(x_ei[N]); |
|
145 |
s_gp[N+1] = s_gp[0] + A[N] * dt*(x_gp[N]); |
|
146 |
s_gi[N+1] = s_gi[0] + A[N] * dt*(x_gi[N]); |
|
147 |
y [N+1] = y [0] + A[N] * dt*(x [N]); |
|
148 |
x_ep[N+1] = x_ep[0] + A[N] * dt*(gamma_e*gamma_e * (N_pp * get_Qp(N) + N_pt * Thalamus->y[N] - s_ep[N]) - 2 * gamma_e * x_ep[N]) + noise_xRK(N, 0); |
|
149 |
x_ei[N+1] = x_ei[0] + A[N] * dt*(gamma_e*gamma_e * (N_ip * get_Qp(N) + N_it * Thalamus->y[N] - s_ei[N]) - 2 * gamma_e * x_ei[N]) + noise_xRK(N, 1) ; |
|
150 |
x_gp[N+1] = x_gp[0] + A[N] * dt*(gamma_g*gamma_g * (N_pi * get_Qi(N) - s_gp[N]) - 2 * gamma_g * x_gp[N]); |
|
151 |
x_gi[N+1] = x_gi[0] + A[N] * dt*(gamma_g*gamma_g * (N_ii * get_Qi(N) - s_gi[N]) - 2 * gamma_g * x_gi[N]); |
|
152 |
x [N+1] = x [0] + A[N] * dt*(nu * nu * ( get_Qp(N) - y [N]) - 2 * nu * x [N]); |