23#ifndef IAF_COND_ALPHA_MC_H
24#define IAF_COND_ALPHA_MC_H
35#include <gsl/gsl_errno.h>
36#include <gsl/gsl_matrix.h>
37#include <gsl/gsl_odeiv.h>
58extern "C" int iaf_cond_alpha_mc_dynamics(
double,
const double*,
double*,
void* );
171void register_iaf_cond_alpha_mc(
const std::string& name );
180 iaf_cond_alpha_mc(
const iaf_cond_alpha_mc& );
181 ~iaf_cond_alpha_mc()
override;
189 using Node::handles_test_event;
191 size_t send_test_event( Node&,
size_t, synindex,
bool )
override;
193 void handle( SpikeEvent& )
override;
194 void handle( CurrentEvent& )
override;
195 void handle( DataLoggingRequest& )
override;
197 size_t handles_test_event( SpikeEvent&,
size_t )
override;
198 size_t handles_test_event( CurrentEvent&,
size_t )
override;
199 size_t handles_test_event( DataLoggingRequest&,
size_t )
override;
201 void get_status( Dictionary& )
const override;
202 void set_status(
const Dictionary& )
override;
205 void init_buffers_()
override;
206 void pre_run_hook()
override;
207 void update( Time
const&,
const long,
const long )
override;
225 static const size_t MIN_SPIKE_RECEPTOR = 1;
230 enum SpikeSynapseTypes
232 SOMA_EXC = MIN_SPIKE_RECEPTOR,
241 static const size_t NUM_SPIKE_RECEPTORS = SUP_SPIKE_RECEPTOR - MIN_SPIKE_RECEPTOR;
248 static const size_t MIN_CURR_RECEPTOR = SUP_SPIKE_RECEPTOR;
253 enum CurrentSynapseTypes
255 I_SOMA = MIN_CURR_RECEPTOR,
261 static const size_t NUM_CURR_RECEPTORS = SUP_CURR_RECEPTOR - MIN_CURR_RECEPTOR;
265 friend int iaf_cond_alpha_mc_dynamics(
double,
const double*,
double*,
void* );
267 friend class RecordablesMap< iaf_cond_alpha_mc >;
268 friend class UniversalDataLogger< iaf_cond_alpha_mc >;
296 double g_conn[ NCOMP - 1 ];
300 double E_ex[ NCOMP ];
301 double E_in[ NCOMP ];
304 double tau_synE[ NCOMP ];
306 double tau_synI[ NCOMP ];
311 Parameters_(
const Parameters_& );
312 Parameters_& operator=(
const Parameters_& );
314 void get( Dictionary& )
const;
315 void set(
const Dictionary&, Node* node );
348 double y_[ STATE_VEC_SIZE ];
351 State_(
const Parameters_& );
352 State_(
const State_& );
354 State_& operator=(
const State_& );
356 void get( Dictionary& )
const;
357 void set(
const Dictionary&,
const Parameters_&, Node* );
367 idx(
size_t comp, StateVecElems_ elem )
369 return comp * STATE_VEC_COMPS + elem;
381 Buffers_( iaf_cond_alpha_mc& );
383 Buffers_(
const Buffers_&, iaf_cond_alpha_mc& );
386 UniversalDataLogger< iaf_cond_alpha_mc > logger_;
391 std::vector< RingBuffer > spikes_;
392 std::vector< RingBuffer > currents_;
396 gsl_odeiv_control* c_;
397 gsl_odeiv_evolve* e_;
398 gsl_odeiv_system sys_;
404 double IntegrationStep_;
413 double I_stim_[ NCOMP ];
424 double PSConInit_E_[ NCOMP ];
427 double PSConInit_I_[ NCOMP ];
429 int RefractoryCounts_;
438 template < State_::StateVecElems_ elem, Compartments_ comp >
442 return S_.y_[ S_.idx( comp, elem ) ];
449 return Time::get_resolution().get_ms() * S_.r_;
460 static std::vector< std::string > comp_names_;
465 static RecordablesMap< iaf_cond_alpha_mc > recordablesMap_;
469iaf_cond_alpha_mc::send_test_event(
Node& target,
size_t receptor_type,
synindex,
bool )
472 e.set_sender( *
this );
473 return target.handles_test_event( e, receptor_type );
477iaf_cond_alpha_mc::handles_test_event(
SpikeEvent&,
size_t receptor_type )
479 if ( receptor_type < MIN_SPIKE_RECEPTOR or receptor_type >= SUP_SPIKE_RECEPTOR )
481 if ( receptor_type >= SUP_CURR_RECEPTOR )
494iaf_cond_alpha_mc::handles_test_event(
CurrentEvent&,
size_t receptor_type )
496 if ( receptor_type < MIN_CURR_RECEPTOR or receptor_type >= SUP_CURR_RECEPTOR )
498 if ( receptor_type < MIN_CURR_RECEPTOR )
513 if ( receptor_type != 0 )
515 if ( receptor_type >= SUP_CURR_RECEPTOR )
528iaf_cond_alpha_mc::get_status( Dictionary& d )
const
541 Dictionary receptor_dict_;
558iaf_cond_alpha_mc::set_status(
const Dictionary& d )
560 Parameters_ ptmp = P_;
563 stmp.set( d, ptmp,
this );
A node which archives spike history for the purposes of spike-timing dependent plasticity (STDP).
Definition archiving_node.h:49
void get_status(Dictionary &d) const override
Export properties of the node by setting entries in the status dictionary.
Definition archiving_node.cpp:249
void set_status(const Dictionary &d) override
Change properties of the node according to the entries in the dictionary.
Definition archiving_node.cpp:265
Event for electrical currents.
Definition event.h:608
Request data to be logged/logged data to be sent.
Definition event.h:675
Exception to be thrown if the specified receptor type does not accept the event type.
Definition exceptions.h:438
Base class for all NEST network objects.
Definition node.h:99
Event for spike information.
Definition event.h:420
Exception to be thrown if the specified receptor type does not exist in the node.
Definition exceptions.h:417
const std::string t_ref("t_ref")
const std::string E_L("E_L")
const std::string I_e("I_e")
const std::string V_reset("V_reset")
const std::string recordables("recordables")
const std::string C_m("C_m")
const std::string V_th("V_th")
const std::string receptor_types("receptor_types")
const std::string proximal_curr("proximal_curr")
const std::string receptor_type("receptor_type")
const std::string E_in("E_in")
const std::string soma_exc("soma_exc")
const std::string distal_inh("distal_inh")
const std::string target("target")
const std::string distal_curr("distal_curr")
const std::string proximal_inh("proximal_inh")
const std::string soma_curr("soma_curr")
const std::string distal_exc("distal_exc")
const std::string E_ex("E_ex")
const std::string proximal_exc("proximal_exc")
const std::string soma_inh("soma_inh")
const std::string g_L("g_L")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
constexpr auto to_underlying(E e) noexcept
Cast enum value to underlying integer type.
Definition nest_types.h:188
RecordablesMap< binary_neuron< TGainfunction > > binary_neuron< TGainfunction >::recordablesMap_
Definition binary_neuron.h:319
size_t synindex
For enumerations of synapse types.
Definition nest_types.h:121
const double e
Definition numerics.cpp:32