23#ifndef IAF_CHXK_2008_H
24#define IAF_CHXK_2008_H
32#include <gsl/gsl_errno.h>
33#include <gsl/gsl_matrix.h>
34#include <gsl/gsl_odeiv.h>
144extern "C" int iaf_chxk_2008_dynamics(
double,
const double*,
double*,
void* );
146void register_iaf_chxk_2008(
const std::string& name );
148class iaf_chxk_2008 :
public ArchivingNode
155 iaf_chxk_2008(
const iaf_chxk_2008& );
156 ~iaf_chxk_2008()
override;
164 using Node::handles_test_event;
166 size_t send_test_event( Node&,
size_t, synindex,
bool )
override;
169 is_off_grid()
const override
174 size_t handles_test_event( SpikeEvent&,
size_t )
override;
175 size_t handles_test_event( CurrentEvent&,
size_t )
override;
176 size_t handles_test_event( DataLoggingRequest&,
size_t )
override;
178 void handle( SpikeEvent& )
override;
179 void handle( CurrentEvent& )
override;
180 void handle( DataLoggingRequest& )
override;
182 void get_status(
Dictionary& )
const override;
183 void set_status(
const Dictionary& )
override;
186 void init_buffers_()
override;
187 void pre_run_hook()
override;
188 void update( Time
const&,
const long,
const long )
override;
195 friend int iaf_chxk_2008_dynamics(
double,
const double*,
double*,
void* );
198 friend class RecordablesMap< iaf_chxk_2008 >;
199 friend class UniversalDataLogger< iaf_chxk_2008 >;
256 double y[ STATE_VEC_SIZE ];
261 State_(
const Parameters_& );
262 State_(
const State_& );
264 State_& operator=(
const State_& );
272 void set(
const Dictionary&,
const Parameters_&, Node* );
286 Buffers_( iaf_chxk_2008& );
287 Buffers_(
const Buffers_&, iaf_chxk_2008& );
290 UniversalDataLogger< iaf_chxk_2008 > logger_;
293 RingBuffer spike_exc_;
294 RingBuffer spike_inh_;
295 RingBuffer currents_;
299 gsl_odeiv_control* c_;
300 gsl_odeiv_evolve* e_;
301 gsl_odeiv_system sys_;
307 double IntegrationStep_;
343 double PSConInit_AHP;
349 template < State_::StateVecElems elem >
360 return Time::get_resolution().get_ms() * S_.r;
364 get_I_syn_exc_()
const
366 return S_.y[ State_::G_EXC ] * ( S_.y[ State_::V_M ] - P_.E_ex );
369 get_I_syn_inh_()
const
371 return S_.y[ State_::G_INH ] * ( S_.y[ State_::V_M ] - P_.E_in );
376 return S_.y[ State_::G_AHP ] * ( S_.y[ State_::V_M ] - P_.E_ahp );
389 static RecordablesMap< iaf_chxk_2008 > recordablesMap_;
396iaf_chxk_2008::send_test_event( Node& target,
size_t receptor_type,
synindex,
bool )
399 e.set_sender( *
this );
401 return target.handles_test_event( e, receptor_type );
405iaf_chxk_2008::handles_test_event( SpikeEvent&,
size_t receptor_type )
407 if ( receptor_type != 0 )
409 throw UnknownReceptorType( receptor_type, get_name() );
415iaf_chxk_2008::handles_test_event( CurrentEvent&,
size_t receptor_type )
417 if ( receptor_type != 0 )
419 throw UnknownReceptorType( receptor_type, get_name() );
425iaf_chxk_2008::handles_test_event( DataLoggingRequest& dlr,
size_t receptor_type )
427 if ( receptor_type != 0 )
429 throw UnknownReceptorType( receptor_type, get_name() );
431 return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
435iaf_chxk_2008::get_status(
Dictionary& d )
const
445iaf_chxk_2008::set_status(
const Dictionary& d )
447 Parameters_ ptmp = P_;
450 stmp.set( d, ptmp,
this );
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
void get_status(Dictionary &d) const override
Export properties of the node by setting entries in the status dictionary.
Definition archiving_node.cpp:220
void set_status(const Dictionary &d) override
Change properties of the node according to the entries in the dictionary.
Definition archiving_node.cpp:236
const std::string E_L("E_L")
const std::string ahp_bug("ahp_bug")
const std::string I_e("I_e")
const std::string recordables("recordables")
const std::string g_ahp("g_ahp")
const std::string C_m("C_m")
const std::string V_th("V_th")
const std::string E_in("E_in")
const std::string target("target")
const std::string E_ahp("E_ahp")
const std::string tau_ahp("tau_ahp")
const std::string E_ex("E_ex")
const std::string g_L("g_L")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
size_t synindex
For enumerations of synapse types.
Definition nest_types.h:115
const double e
Definition numerics.cpp:32