Package ca.nengo.model

Examples of ca.nengo.model.SimulationException


   */
  public TimeSeries getHistory(String stateName) throws SimulationException {
    if (stateName.equals(DYNAMICS)) {
      return myDynamicsOutput;
    } else {
      throw new SimulationException("Unknown state: " + stateName);
    }
  }
View Full Code Here


   */
  public TimeSeries getHistory(String stateName) throws SimulationException {
    if(stateName.equals(MEMBRANE_POTENTIAL)) {
      return myMembranePotentialHistory;
    } else {
      throw new SimulationException("State name " + stateName + " is unknown");
    }
  }
View Full Code Here

   *     dimension of each Node state is included in the composite.
   * @see ca.nengo.model.Probeable#getHistory(java.lang.String)
   */
    public TimeSeries getHistory(String stateName) throws SimulationException {
    if (!myStateNames.containsKey(stateName)) {
      throw new SimulationException("The state " + stateName + " is unknown");
    }

    List<Integer> nodeNumbers = myStateNames.get(stateName);
    float[] firstNodeTimes = ((Probeable) myNodes[nodeNumbers.get(0).intValue()]).getHistory(stateName).getTimes();

View Full Code Here

     * @param values Can be either SpikeOutput or RealOutput
     * @see ca.nengo.model.Termination#setValues(ca.nengo.model.InstantaneousOutput)
     */
    public void setValues(InstantaneousOutput values) throws SimulationException {
        if (values.getDimension() != getDimensions()) {
            throw new SimulationException("Input must have dimension " + getDimensions());
        }

        myRawInput = values;

        myPreciseSpikeInputTimes = (values instanceof PreciseSpikeOutput) ? ((PreciseSpikeOutput)values).getSpikeTimes() : null;
View Full Code Here

   *
   * @see ca.nengo.model.Termination#setValues(ca.nengo.model.InstantaneousOutput)
   */
  public void setValues(InstantaneousOutput values) throws SimulationException {
    if (values.getDimension() != getDimensions()) {
      throw new SimulationException("Dimension of input (" + values.getDimension()
          + ") does not equal dimension of this Termination (" + getDimensions() + ")");
    }

    if ( !(values instanceof RealOutput) ) {
      throw new SimulationException("Only real-valued input is accepted at a DecodedTermination");
    }

    RealOutput ro = (RealOutput) values;
    myInputValues = new RealOutputImpl(MU.sum(ro.getValues(), myStaticBias), ro.getUnits(), ro.getTime());

View Full Code Here

  public TimeSeries getHistory(String stateName) throws SimulationException {
    if (stateName.equals(OUTPUT)) {
      return new TimeSeriesImpl(new float[]{myTime},
          new float[][]{myOutputValues}, Units.uniform(Units.UNK, myOutputValues.length));
    } else {
      throw new SimulationException("The state '" + stateName + "' is unknown");
    }
  }
View Full Code Here

                        ((ModulatedPlasticEnsembleTermination) pet).setModTerminationState
                          (modTerm.getName(), input, endTime);
                    }
                }
                catch (StructuralException e) {
                    throw new SimulationException(e.getMessage());
                }
            }

            myLastPlasticityTime = endTime;
        }
View Full Code Here

   */
  public TimeSeries getHistory(String stateName) throws SimulationException {
    TimeSeries result = null;

    if (!STATE_NAME.equals(stateName)) {
      throw new SimulationException("State " + stateName + " is unknown");
    }

    float[] values = ((RealOutput) myOrigin.getValues()).getValues();
    result = new TimeSeriesImpl(new float[]{myTime}, new float[][]{values}, Units.uniform(myUnits, values.length));

View Full Code Here

    if (stateName.equals(V)) {
      result = new TimeSeries1DImpl(myTime, myVoltageHistory, Units.AVU);
    } else if (stateName.equals(U)){
      result = new TimeSeries1DImpl(myTime, myRecoveryHistory, Units.UNK);
    } else {
      throw new SimulationException("The state name " + stateName + " is unknown.");
    }

    return result;
  }
View Full Code Here

    } else if (stateName.equalsIgnoreCase("N")) {
      result = new TimeSeries1DImpl(myTime, myNHistory, Units.UNK);
    } else if (stateName.equalsIgnoreCase("rate")) {
      result = new TimeSeries1DImpl(myTime, myRateHistory, Units.SPIKES_PER_S);
    } else {
      throw new SimulationException("The state name " + stateName + " is unknown.");
    }

    return result;
  }
View Full Code Here

TOP

Related Classes of ca.nengo.model.SimulationException

Copyright © 2018 www.massapicom. 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.