Package ca.nengo.dynamics

Examples of ca.nengo.dynamics.Integrator.integrate()


    TimeSeries input = new TimeSeriesImpl(new float[]{0f, .001f, .5f},
        new float[][]{new float[]{1, rl, 0f}, new float[]{0, rl, 0f}, new float[]{0, rl, 0f}},
        new Units[]{Units.UNK, Units.M, Units.M_PER_S});

    long startTime = System.currentTimeMillis();
    TimeSeries output = i.integrate(d, input);
    ourLogger.info("Elapsed time: " + (System.currentTimeMillis() - startTime));

    Plotter.plot(output, "Force");
  }
View Full Code Here


      C[i] = new float[dim];
      C[i][i] = 1f / tau;
    }   
    LTISystem filter = new SimpleLTISystem(A, B, C, new float[dim], series.getUnits());
   
    return integrator.integrate(filter, series);   
  }
 
  /**
   * @param series An n-dimensional TimeSeries
   * @param dim Index (less than n-1) of dimension to extract
View Full Code Here

    impulse[input] = pulseHeight;
   
    float[] zero = new float[system.getInputDimension()];
    Units[] units = new Units[system.getInputDimension()];   
   
    TimeSeries pulse = integrator.integrate(system,
        new TimeSeriesImpl(new float[]{0f, pulseWidth}, new float[][]{impulse, impulse}, units));
    integral = integrate(pulse);   
   
    float decayTime = -10f / (float) eigRange[1];   
    TimeSeries decay = integrator.integrate(system,
View Full Code Here

    TimeSeries pulse = integrator.integrate(system,
        new TimeSeriesImpl(new float[]{0f, pulseWidth}, new float[][]{impulse, impulse}, units));
    integral = integrate(pulse);   
   
    float decayTime = -10f / (float) eigRange[1];   
    TimeSeries decay = integrator.integrate(system,
        new TimeSeriesImpl(new float[]{0f, decayTime}, new float[][]{zero, zero}, units)); //time-invariant, so we can start at 0
    float[] increment = integrate(decay);
    integral = MU.sum(integral, increment);
 
    float stepTime = -.5f / (float) eigRange[1];
View Full Code Here

    float[] increment = integrate(decay);
    integral = MU.sum(integral, increment);
 
    float stepTime = -.5f / (float) eigRange[1];
    do {
      decay = integrator.integrate(system,
          new TimeSeriesImpl(new float[]{0f, stepTime}, new float[][]{zero, zero}, units));
      increment = integrate(decay);
      integral = MU.sum(integral, increment);
    } while (substantialChange(integral, increment, .001f * stepTime / decayTime));

View Full Code Here

  public void testIntegrate() {
    VanderPol system = new VanderPol(new float[]{.1f, .1f});
    Integrator integrator = new RK45Integrator();
    TimeSeries input = new TimeSeriesImpl(new float[]{0, 10f}, new float[][]{new float[0], new float[0]}, new Units[]{});
    TimeSeries result = integrator.integrate(system, input);
   
    assertTrue(result.getTimes().length < 60);
   
    //check results against selected hard-coded values from matlab solution ...
    InterpolatorND interpolator = new LinearInterpolatorND(result);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.