123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- #ifndef IAF_PSC_EXP_H
- #define IAF_PSC_EXP_H
- #include "layer.hpp"
- #include <exception>
- #include <vector>
- class BadProperty: public std::runtime_error
- {
- public:
- BadProperty(const std::string& what): std::runtime_error(what) {}
- };
- class iaf_psc_exp : public layer
- {
- public:
- iaf_psc_exp(int n);
- ~iaf_psc_exp();
- void calibrate();
-
- /**
- * Independent parameters of the model.
- */
- struct Parameters_
- {
-
- /** Membrane time constant in ms. */
- double Tau_;
- /** Membrane capacitance in pF. */
- double C_;
-
- /** Refractory period in ms. */
- double t_ref_;
- /** Resting potential in mV. */
- double U0_;
- /** External current in pA */
- double I_e_;
- /** Threshold, RELATIVE TO RESTING POTENTAIL(!).
- I.e. the real threshold is (U0_+Theta_). */
- double Theta_;
- /** reset value of the membrane potential */
- double V_reset_;
- /** Time constant of excitatory synaptic current in ms. */
- double tau_ex_;
- /** Time constant of inhibitory synaptic current in ms. */
- double tau_in_;
-
- Parameters_(); //!< Sets default parameter values
- void set(double Tau_m, double C, double t_ref, double U0,
- double I_e, double Theta, double V_reset, double tau_ex, double tau_in);
- };
-
- /**
- * State variables of the model.
- */
- struct State_
- {
- // state variables
- double i_0_; // synaptic dc input current, variable 0
- double V_m_; // membrane potential, variable 2
- int r_ref_; // absolute refractory counter (no membrane potential propagation)
-
- State_(); //!< Default initialization
- };
- /**
- * Internal variables of the model.
- */
- struct Variables_
- {
- /** Amplitude of the synaptic current.
- This value is chosen such that a post-synaptic potential with
- weight one has an amplitude of 1 mV.
- @note mog - I assume this, not checked.
- */
- // double_t PSCInitialValue_;
-
- // time evolution operator
- double P20_;
- double P11ex_;
- double P11in_;
- double P21ex_;
- double P21in_;
- double P22_;
- int RefractoryCounts_;
- };
-
- Parameters_ P_;
- State_* pS_;
- Variables_ V_;
- vector<float> i_syn_ex_;
- vector<float> i_syn_in_;
- vector<float> currents;
-
- virtual float* GetInputPointer(csimInputChannel num=csimInputChannel_AMPA);
- virtual int proceede(int);
- virtual int WriteSimInfo(fstream &fw);
- virtual int StartBinRec(int n, int StartNumber=0);
- virtual int reset(int t);
-
-
- };
- #endif // IAF_PSC_EXP_H
|