23#ifndef HH_COND_BETA_GAP_TRAUB_H
24#define HH_COND_BETA_GAP_TRAUB_H
32#include <gsl/gsl_errno.h>
33#include <gsl/gsl_matrix.h>
34#include <gsl/gsl_odeiv.h>
35#include <gsl/gsl_sf_exp.h>
60extern "C" int hh_cond_beta_gap_traub_dynamics(
double,
const double*,
double*,
void* );
176void register_hh_cond_beta_gap_traub(
const std::string& name );
178class hh_cond_beta_gap_traub :
public ArchivingNode
184 hh_cond_beta_gap_traub();
185 hh_cond_beta_gap_traub(
const hh_cond_beta_gap_traub& );
186 ~hh_cond_beta_gap_traub()
override;
194 using Node::handles_test_event;
195 using Node::sends_secondary_event;
197 size_t send_test_event( Node& target,
size_t receptor_type, synindex,
bool )
override;
199 void handle( SpikeEvent& )
override;
200 void handle( CurrentEvent& )
override;
201 void handle( DataLoggingRequest& )
override;
202 void handle( GapJunctionEvent& )
override;
204 size_t handles_test_event( SpikeEvent&,
size_t )
override;
205 size_t handles_test_event( CurrentEvent&,
size_t )
override;
206 size_t handles_test_event( DataLoggingRequest&,
size_t )
override;
207 size_t handles_test_event( GapJunctionEvent&,
size_t )
override;
210 sends_secondary_event( GapJunctionEvent& )
override
214 void get_status(
Dictionary& )
const override;
215 void set_status(
const Dictionary& )
override;
218 void init_buffers_()
override;
219 double get_normalisation_factor(
double,
double );
220 void pre_run_hook()
override;
225 bool update_( Time
const&,
const long,
const long,
const bool );
227 void update( Time
const&,
const long,
const long )
override;
228 bool wfr_update( Time
const&,
const long,
const long )
override;
235 friend int hh_cond_beta_gap_traub_dynamics(
double,
const double*,
double*,
void* );
238 friend class RecordablesMap< hh_cond_beta_gap_traub >;
239 friend class UniversalDataLogger< hh_cond_beta_gap_traub >;
296 double y_[ STATE_VEC_SIZE ];
299 State_(
const Parameters_& p );
300 State_(
const State_& s );
302 State_& operator=(
const State_& );
305 void set(
const Dictionary&,
const Parameters_&, Node* );
329 int refractory_counts_;
340 Buffers_( hh_cond_beta_gap_traub& );
342 Buffers_(
const Buffers_&, hh_cond_beta_gap_traub& );
345 UniversalDataLogger< hh_cond_beta_gap_traub > logger_;
348 RingBuffer spike_exc_;
349 RingBuffer spike_inh_;
350 RingBuffer currents_;
354 gsl_odeiv_control* c_;
355 gsl_odeiv_evolve* e_;
356 gsl_odeiv_system sys_;
362 double IntegrationStep_;
368 std::vector< double > last_y_values;
374 std::vector< double > interpolation_coefficients;
389 template < State_::StateVecElems elem >
393 return S_.y_[ elem ];
402 static RecordablesMap< hh_cond_beta_gap_traub > recordablesMap_;
406hh_cond_beta_gap_traub::update( Time
const& origin,
const long from,
const long to )
408 update_( origin, from, to,
false );
412hh_cond_beta_gap_traub::wfr_update( Time
const& origin,
const long from,
const long to )
414 State_ old_state = S_;
415 const bool wfr_tol_exceeded = update_( origin, from, to,
true );
418 return not wfr_tol_exceeded;
422hh_cond_beta_gap_traub::send_test_event( Node& target,
size_t receptor_type,
synindex,
bool )
425 e.set_sender( *
this );
427 return target.handles_test_event( e, receptor_type );
432hh_cond_beta_gap_traub::handles_test_event( SpikeEvent&,
size_t receptor_type )
434 if ( receptor_type != 0 )
436 throw UnknownReceptorType( receptor_type, get_name() );
442hh_cond_beta_gap_traub::handles_test_event( CurrentEvent&,
size_t receptor_type )
444 if ( receptor_type != 0 )
446 throw UnknownReceptorType( receptor_type, get_name() );
452hh_cond_beta_gap_traub::handles_test_event( DataLoggingRequest& dlr,
size_t receptor_type )
454 if ( receptor_type != 0 )
456 throw UnknownReceptorType( receptor_type, get_name() );
458 return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
462hh_cond_beta_gap_traub::handles_test_event( GapJunctionEvent&,
size_t receptor_type )
464 if ( receptor_type != 0 )
466 throw UnknownReceptorType( receptor_type, get_name() );
472hh_cond_beta_gap_traub::get_status(
Dictionary& d )
const
484hh_cond_beta_gap_traub::set_status(
const Dictionary& d )
486 Parameters_ ptmp = P_;
489 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 V_T("V_T")
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 tau_rise_in("tau_rise_in")
const std::string tau_decay_in("tau_decay_in")
const std::string g_K("g_K")
const std::string E_in("E_in")
const std::string tau_decay_ex("tau_decay_ex")
const std::string target("target")
const std::string t_spike("t_spike")
const std::string E_ex("E_ex")
const std::string tau_rise_ex("tau_rise_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
Declarations for base class Node.