23#ifndef HH_PSC_ALPHA_GAP_H
24#define HH_PSC_ALPHA_GAP_H
31#include <gsl/gsl_errno.h>
32#include <gsl/gsl_matrix.h>
33#include <gsl/gsl_odeiv.h>
34#include <gsl/gsl_sf_exp.h>
59extern "C" int hh_psc_alpha_gap_dynamics(
double,
const double*,
double*,
void* );
148void register_hh_psc_alpha_gap(
const std::string& name );
150class hh_psc_alpha_gap :
public ArchivingNode
157 hh_psc_alpha_gap(
const hh_psc_alpha_gap& );
158 ~hh_psc_alpha_gap()
override;
166 using Node::handles_test_event;
167 using Node::sends_secondary_event;
169 size_t send_test_event( Node& target,
size_t receptor_type, synindex,
bool )
override;
171 void handle( SpikeEvent& )
override;
172 void handle( CurrentEvent& )
override;
173 void handle( DataLoggingRequest& )
override;
174 void handle( GapJunctionEvent& )
override;
176 size_t handles_test_event( SpikeEvent&,
size_t )
override;
177 size_t handles_test_event( CurrentEvent&,
size_t )
override;
178 size_t handles_test_event( DataLoggingRequest&,
size_t )
override;
179 size_t handles_test_event( GapJunctionEvent&,
size_t )
override;
182 sends_secondary_event( GapJunctionEvent& )
override
186 void get_status(
Dictionary& )
const override;
187 void set_status(
const Dictionary& )
override;
190 void init_buffers_()
override;
191 void pre_run_hook()
override;
196 bool update_( Time
const&,
const long,
const long,
const bool );
198 void update( Time
const&,
const long,
const long )
override;
199 bool wfr_update( Time
const&,
const long,
const long )
override;
206 friend int hh_psc_alpha_gap_dynamics(
double,
const double*,
double*,
void* );
209 friend class RecordablesMap< hh_psc_alpha_gap >;
210 friend class UniversalDataLogger< hh_psc_alpha_gap >;
267 double y_[ STATE_VEC_SIZE ];
270 State_(
const Parameters_& );
271 State_(
const State_& );
273 State_& operator=(
const State_& );
287 Buffers_( hh_psc_alpha_gap& );
289 Buffers_(
const Buffers_&, hh_psc_alpha_gap& );
292 UniversalDataLogger< hh_psc_alpha_gap > logger_;
295 RingBuffer spike_exc_;
296 RingBuffer spike_inh_;
297 RingBuffer currents_;
301 gsl_odeiv_control* c_;
302 gsl_odeiv_evolve* e_;
303 gsl_odeiv_system sys_;
309 double IntegrationStep_;
314 std::vector< double > last_y_values;
318 std::vector< double > interpolation_coefficients;
338 double PSCurrInit_E_;
341 double PSCurrInit_I_;
343 int RefractoryCounts_;
349 template < State_::StateVecElems elem >
353 return S_.y_[ elem ];
364 static RecordablesMap< hh_psc_alpha_gap > recordablesMap_;
368hh_psc_alpha_gap::update( Time
const& origin,
const long from,
const long to )
370 update_( origin, from, to,
false );
374hh_psc_alpha_gap::wfr_update( Time
const& origin,
const long from,
const long to )
376 State_ old_state = S_;
377 const bool wfr_tol_exceeded = update_( origin, from, to,
true );
380 return not wfr_tol_exceeded;
384hh_psc_alpha_gap::send_test_event( Node& target,
size_t receptor_type,
synindex,
bool )
387 se.set_sender( *
this );
388 return target.handles_test_event( se, receptor_type );
393hh_psc_alpha_gap::handles_test_event( SpikeEvent&,
size_t receptor_type )
395 if ( receptor_type != 0 )
397 throw UnknownReceptorType( receptor_type, get_name() );
403hh_psc_alpha_gap::handles_test_event( CurrentEvent&,
size_t receptor_type )
405 if ( receptor_type != 0 )
407 throw UnknownReceptorType( receptor_type, get_name() );
413hh_psc_alpha_gap::handles_test_event( DataLoggingRequest& dlr,
size_t receptor_type )
415 if ( receptor_type != 0 )
417 throw UnknownReceptorType( receptor_type, get_name() );
419 return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
423hh_psc_alpha_gap::handles_test_event( GapJunctionEvent&,
size_t receptor_type )
425 if ( receptor_type != 0 )
427 throw UnknownReceptorType( receptor_type, get_name() );
433hh_psc_alpha_gap::get_status(
Dictionary& d )
const
443hh_psc_alpha_gap::set_status(
const Dictionary& d )
445 Parameters_ ptmp = P_;
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 I_e("I_e")
const std::string E_K("E_K")
const std::string recordables("recordables")
const std::string C_m("C_m")
const std::string g_Na("g_Na")
const std::string E_Na("E_Na")
const std::string g_Kv3("g_Kv3")
const std::string target("target")
const std::string g_Kv1("g_Kv1")
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
Declarations for base class Node.