Examples of EulerIntegrator


Examples of ca.nengo.dynamics.impl.EulerIntegrator

      public float[] f(float t, float[] u) {
        u[0] = Math.abs(u[0]);
        return super.f(t, u);
      }
    };
    return new BasicTermination(this, myEADynamics, new EulerIntegrator(.001f), SkeletalMuscle.EXCITATION_TERMINATION);
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

    //Plotter.plot(CEForceVelocity, vmax, .1f, -vmax, "CE Force-Velocity");
    //Plotter.plot(SEForceLength, 0f, rl*.001f, rl*.1f, "SE Force-Length");

    Dynamics d = new Dynamics(tauEA, 5000f, CEForceLength, CEForceVelocity, SEForceLength, false);
    d.setState(new float[]{.001f, rl});
    Integrator i = new EulerIntegrator(.0001f);

//    TimeSeries input = new TimeSeriesImpl(new float[]{0f, 1f},
//        new float[][]{new float[]{1, rl, 0f}, new float[]{1, rl, 0f}},
//        new Units[]{Units.UNK, Units.M, Units.M_PER_S});
    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

Examples of ca.nengo.dynamics.impl.EulerIntegrator

  public static TimeSeries filter(TimeSeries series, float tau) {
    float[] times = series.getTimes();
    float meanStepSize = (times[times.length-1] - times[1]) / times.length;
    float integrationStepSize = Math.min(meanStepSize/2f, tau/2f);
   
    Integrator integrator = new EulerIntegrator(integrationStepSize);
   
    int dim = series.getDimension();
    float[] A = new float[dim];
    float[][] B = new float[dim][];
    float[][] C = new float[dim][];
    for (int i = 0; i < dim; i++) {
      A[i] = -1f / tau;
      B[i] = new float[dim];
      B[i][i] = 1f;
      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);   
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

    //functional test ...
    public static void main(String[] args) {
        float tau = .01f;
        DynamicalSystem dynamics = new SimpleLTISystem(new float[]{-1f/tau}, new float[][]{new float[]{1f/tau}}, MU.I(1), new float[1], new Units[]{Units.UNK});
        Integrator integrator = new EulerIntegrator(.0001f);
//      Noise noise = NoiseFactory.makeRandomNoise(1000, new GaussianPDF(0, 1));
        Noise noise = NoiseFactory.makeRandomNoise(1000, new GaussianPDF(0, 1), dynamics, integrator);
//      Noise noise = NoiseFactory.makeNullNoise(1);
//      Noise noise = NoiseFactory.makeExplicitNoise(new Function[]{new FourierFunction(1, 10, 1, -1)});
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

  /**
   * Uses default parameters to allow later configuration.
   */
  public DynamicalSystemSpikeGenerator() {
    this(getDefaultDynamics(), new EulerIntegrator(.001f), 0, 0.99f, .002f, new float[]{0, 1}, .5f);
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

    myReuseApproximators = true;
    myUnscaledEvalPoints = evalPoints;
    setRadii(radii);
    myFixedModes = null;

    myDirectModeIntegrator = new EulerIntegrator(.001f);

    myUseGPU = true;
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

      }
      biasEncoders[j] = max;
    }

    float baseTauPSC = baseTermination.getTau();
    EulerIntegrator integrator = new EulerIntegrator(Math.min(interneuronTauPSC, baseTauPSC) / 10f);

    float scale = 1 / interneuronTauPSC; //output scaling to make impulse integral = 1
    LinearSystem interneuronDynamics = new SimpleLTISystem(
        new float[]{-1f/interneuronTauPSC},
        new float[][]{new float[]{1f}},
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

                new float[][]{new float[]{scale}},
                new float[]{0f},
                new Units[]{Units.UNK}
        );

        EulerIntegrator integrator = new EulerIntegrator(tauPSC / 10f);

        DecodedTermination result = new DecodedTermination(this, name, matrix, dynamics, integrator);
        if (isModulatory) {
            result.setModulatory(isModulatory);
        }
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

            if (Math.abs(eigenvalues[i]) > fastest) {
                fastest = Math.abs(eigenvalues[i]);
            }
        }

        EulerIntegrator integrator = new EulerIntegrator(1f / (10f * (float) fastest));

        DecodedTermination result = new DecodedTermination(this, name, matrix, dynamics, integrator);
        if (isModulatory) {
            result.setModulatory(isModulatory);
        }
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator

    myNodes = nodes;
    myNodeOrigin = nodeOrigin;
    myFunctions = functions;
    myDecoders = findDecoders(nodes, functions, approximator);
    myMode = SimulationMode.DEFAULT;
    myIntegrator = new EulerIntegrator(.001f);

    reset(false);
  }
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.