예제 #1
0
void
nest::ac_generator::update( Time const& origin, const long from, const long to )
{
  assert(
    to >= 0 && ( delay ) from < kernel().connection_manager.get_min_delay() );
  assert( from < to );

  long start = origin.get_steps();

  CurrentEvent ce;
  for ( long lag = from; lag < to; ++lag )
  {
    S_.I_ = 0.0;

    if ( device_.is_active( Time::step( start + lag ) ) )
    {
      const double y_0 = S_.y_0_;
      S_.y_0_ = V_.A_00_ * y_0 + V_.A_01_ * S_.y_1_;
      S_.y_1_ = V_.A_10_ * y_0 + V_.A_11_ * S_.y_1_;
      S_.I_ = S_.y_1_ + P_.offset_;

      ce.set_current( S_.I_ );
      kernel().event_delivery_manager.send( *this, ce, lag );
    }
    B_.logger_.record_data( origin.get_steps() + lag );
  }
}
void
nest::dc_generator::update( Time const& origin, const long from, const long to )
{
  long start = origin.get_steps();

  CurrentEvent ce;
  ce.set_current( P_.amp_ );

  for ( long offs = from; offs < to; ++offs )
    if ( device_.is_active( Time::step( start + offs ) ) )
      kernel().event_delivery_manager.send( *this, ce, offs );
}
예제 #3
0
void
nest::dc_generator::update( Time const& origin, const long_t from, const long_t to )
{
  long_t start = origin.get_steps();

  CurrentEvent ce;
  ce.set_current( P_.amp_ );

  for ( long_t offs = from; offs < to; ++offs )
    if ( device_.is_active( Time::step( start + offs ) ) )
      network()->send( *this, ce, offs );
}
예제 #4
0
void nest::ac_generator::update(Time const & origin, const long_t from, const long_t to)
{
  long_t start = origin.get_steps();

  CurrentEvent ce;
  for ( long_t lag = from ; lag < to ; ++lag )
    if( device_.is_active(Time::step(start+lag) ))
      {
        const double_t y_0 = S_.y_0_;
        S_.y_0_ = V_.A_00_ * y_0 + V_.A_01_ * S_.y_1_;
        S_.y_1_ = V_.A_10_ * y_0 + V_.A_11_ * S_.y_1_;
        ce.set_current(S_.y_1_ + P_.offset_);
        network()->send(*this, ce, lag);
      }
}