23#ifndef IAF_BW_2001_EXACT
24#define IAF_BW_2001_EXACT
32#include <gsl/gsl_errno.h>
33#include <gsl/gsl_matrix.h>
34#include <gsl/gsl_odeiv.h>
56extern "C" inline int iaf_bw_2001_exact_dynamics(
double,
const double y[],
double f[],
void* pnode );
184void register_iaf_bw_2001_exact(
const std::string& name );
186class iaf_bw_2001_exact :
public ArchivingNode
190 iaf_bw_2001_exact(
const iaf_bw_2001_exact& );
191 ~iaf_bw_2001_exact()
override;
200 using Node::handles_test_event;
205 size_t send_test_event( Node& target,
size_t receptor_type, synindex,
bool )
override;
207 void handle( SpikeEvent& )
override;
208 void handle( CurrentEvent& e )
override;
209 void handle( DataLoggingRequest& )
override;
211 size_t handles_test_event( SpikeEvent&,
size_t )
override;
212 size_t handles_test_event( CurrentEvent&,
size_t )
override;
213 size_t handles_test_event( DataLoggingRequest&,
size_t )
override;
219 void get_status(
Dictionary& )
const override;
220 void set_status(
const Dictionary& )
override;
223 void init_state_()
override;
224 void pre_run_hook()
override;
225 void init_buffers_()
override;
226 void update( Time
const&,
const long,
const long )
override;
233 INF_SPIKE_RECEPTOR = 0,
241 friend int iaf_bw_2001_exact_dynamics(
double,
const double y[],
double f[],
void* pnode );
244 friend class RecordablesMap< iaf_bw_2001_exact >;
245 friend class UniversalDataLogger< iaf_bw_2001_exact >;
301 size_t state_vec_size;
312 State_(
const Parameters_& );
313 State_(
const State_& );
314 State_& operator=(
const State_& ) =
default;
317 void set(
const Dictionary&,
const Parameters_&, Node* );
331 Buffers_( iaf_bw_2001_exact& );
332 Buffers_(
const Buffers_&, iaf_bw_2001_exact& );
337 UniversalDataLogger< iaf_bw_2001_exact > logger_;
342 std::vector< RingBuffer > spikes_;
343 RingBuffer currents_;
348 std::vector< double > weights_;
355 gsl_odeiv_control* c_;
356 gsl_odeiv_evolve* e_;
357 gsl_odeiv_system sys_;
366 double integration_step_;
387 long RefractoryCounts;
393 template < State_::StateVecElems elem >
395 get_ode_state_elem_()
const
397 return S_.ode_state_[ elem ];
404 return S_.s_NMDA_sum;
432 static RecordablesMap< iaf_bw_2001_exact > recordablesMap_;
438iaf_bw_2001_exact::send_test_event( Node& target,
size_t receptor_type,
synindex,
bool )
441 e.set_sender( *
this );
442 return target.handles_test_event( e, receptor_type );
446iaf_bw_2001_exact::handles_test_event( SpikeEvent&,
size_t receptor_type )
448 if ( not( INF_SPIKE_RECEPTOR < receptor_type and receptor_type < SUP_SPIKE_RECEPTOR ) )
450 throw UnknownReceptorType( receptor_type, get_name() );
455 if ( receptor_type == SynapseTypes::NMDA )
459 if ( B_.e_ !=
nullptr )
461 throw IllegalConnection(
462 "NMDA connections to this model can only be made before the first call to nest.Simulate()" );
466 return S_.num_ports_;
476iaf_bw_2001_exact::handles_test_event( CurrentEvent&,
size_t receptor_type )
478 if ( receptor_type != 0 )
480 throw UnknownReceptorType( receptor_type, get_name() );
486iaf_bw_2001_exact::handles_test_event( DataLoggingRequest& dlr,
size_t receptor_type )
495 if ( receptor_type != 0 )
497 throw UnknownReceptorType( receptor_type, get_name() );
500 return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
504iaf_bw_2001_exact::get_status(
Dictionary& d )
const
522iaf_bw_2001_exact::set_status(
const Dictionary& d )
524 Parameters_ ptmp = P_;
527 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 AMPA("AMPA")
const std::string t_ref("t_ref")
const std::string tau_AMPA("tau_AMPA")
const std::string E_L("E_L")
const std::string s_GABA("s_GABA")
const std::string V_reset("V_reset")
const std::string NMDA("NMDA")
const std::string recordables("recordables")
const std::string C_m("C_m")
const std::string gsl_error_tol("gsl_error_tol")
const std::string V_th("V_th")
const std::string receptor_types("receptor_types")
const std::string s_AMPA("s_AMPA")
const std::string tau_rise_NMDA("tau_rise_NMDA")
const std::string conc_Mg2("conc_Mg2")
const std::string receptor_type("receptor_type")
const std::string tau_decay_NMDA("tau_decay_NMDA")
const std::string E_in("E_in")
const std::string alpha("alpha")
const std::string GABA("GABA")
const std::string tau_GABA("tau_GABA")
const std::string target("target")
const std::string V_m("V_m")
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