|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.nengo.sim.impl.LocalSimulator
public class LocalSimulator
A Simulator that runs locally (ie in the Java Virtual Machine in which it is called). TODO: test
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ca.nengo.util.VisiblyMutable |
|---|
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent, VisiblyMutable.NodeRemovedEvent |
| Constructor Summary | |
|---|---|
LocalSimulator()
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(VisiblyMutable.Listener listener)
|
Probe |
addProbe(java.lang.String ensembleName,
int neuronIndex,
java.lang.String state,
boolean record)
|
Probe |
addProbe(java.lang.String ensembleName,
Probeable target,
java.lang.String state,
boolean record)
|
Probe |
addProbe(java.lang.String nodeName,
java.lang.String state,
boolean record)
|
void |
addSimulatorListener(SimulatorListener listener)
|
Simulator |
clone()
|
static Node[] |
collectNetworkArraysForGPU(Node[] startingNodes)
|
static Node[] |
collectNodes(Node[] startingNodes)
Bring all nodes to the top level so we can run them all at once. |
static Projection[] |
collectProjections(Node[] startingNodes,
Projection[] startingProjections)
Bring all projections to the top level so we can run them all at once. |
protected void |
fireSimulatorEvent(SimulatorEvent event)
|
Probe[] |
getProbes()
|
void |
initialize(Network network)
Initializes the Simulator with a given Network, after which changes to the Network MAY OR MAY NOT BE IGNORED. |
void |
removeChangeListener(VisiblyMutable.Listener listener)
|
void |
removeProbe(Probe probe)
|
void |
removeSimulatorListener(SimulatorListener listener)
|
void |
resetNetwork(boolean randomize,
boolean saveWeights)
Resets all Nodes in the simulated Network. |
void |
resetProbes()
Resets all probes in the network, recursively including subnetworks. |
void |
run(float startTime,
float endTime,
float stepSize)
Runs the Network for the given time range. |
void |
run(float startTime,
float endTime,
float stepSize,
boolean topLevel)
Run function with option to display (or not) the progress in the console |
void |
setDisplayProgress(boolean display)
|
void |
step(float startTime,
float endTime)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalSimulator()
| Method Detail |
|---|
public void initialize(Network network)
Simulator
initialize in interface Simulatornetwork - Network to set up for simulationSimulator.initialize(ca.nengo.model.Network)public void resetProbes()
Simulator
resetProbes in interface SimulatorSimulator.resetProbes()
public void run(float startTime,
float endTime,
float stepSize)
throws SimulationException
Simulator
run in interface SimulatorstartTime - Simulation time at which running startsendTime - Simulation time at which running stopsstepSize - Length of time step at which the Network is run. This determines the
frequency with which outputs are passed between Ensembles, but individual
Neurons may run with different and/or variable time steps.
SimulationException - if a problem is encountered while trying to runSimulator.run(float, float, float)
public void run(float startTime,
float endTime,
float stepSize,
boolean topLevel)
throws SimulationException
run in interface SimulatorstartTime - Simulation time at which running startsendTime - Simulation time at which running stopsstepSize - Length of time step at which the Network is run. This determines the
frequency with which outputs are passed between Ensembles, but individual
Neurons may run with different and/or variable time steps.topLevel - true if the network being run is the top level network, false if it
is a subnetwork
SimulationException - if a problem is encountered while trying to run
public void step(float startTime,
float endTime)
throws SimulationException
SimulationException
public void resetNetwork(boolean randomize,
boolean saveWeights)
Simulator
resetNetwork in interface Simulatorrandomize - True indicates reset to random initial condition (see
Resettable.reset(boolean)).saveWeights - True indicates that the weights on
LinearExponentialTerminations should be saved rather than resetca.nengo.sim.Simulator#resetNetwork(boolean)
public Probe addProbe(java.lang.String nodeName,
java.lang.String state,
boolean record)
throws SimulationException
addProbe in interface SimulatornodeName - Name of a Probeable Node from which state is to be probedstate - The name of the state variable to proberecord - Probe retains history if true
SimulationException - if the referenced Node can not be found, or is not Probeable, or does
not have the specified state variableSimulator.addProbe(java.lang.String, java.lang.String,
boolean)
public Probe addProbe(java.lang.String ensembleName,
int neuronIndex,
java.lang.String state,
boolean record)
throws SimulationException
addProbe in interface SimulatorensembleName - Name of Ensemble containing a Probeable Neuron from which state is to be probedneuronIndex - Index of the Neuron (from 0) within the specified Ensemblestate - The name of the state variable to proberecord - Probe retains history if true
SimulationException - if the referenced Neuron can not be found, or is not Probeable, or does
not have the specified state variableSimulator.addProbe(java.lang.String, int,
java.lang.String, boolean)
public Probe addProbe(java.lang.String ensembleName,
Probeable target,
java.lang.String state,
boolean record)
throws SimulationException
addProbe in interface SimulatorensembleName - Name of Ensemble the target belongs to. Null, if the target is
a top-level nodetarget - Probeable targetstate - The name of the state variable to proberecord - Probe retains history if true
SimulationException - if the referenced Neuron can not be found, or is not
Probeable, or does not have the specified state variableSimulator.addProbe(java.lang.String, int,
java.lang.String, boolean)
public void removeProbe(Probe probe)
throws SimulationException
removeProbe in interface Simulatorprobe - Probe to be removed
SimulationException - if the referenced probe cannot be removedSimulator.removeProbe(ca.nengo.util.Probe)public Probe[] getProbes()
getProbes in interface SimulatorSimulator.getProbes()public void setDisplayProgress(boolean display)
public void addSimulatorListener(SimulatorListener listener)
addSimulatorListener in interface Simulatorlistener - A Simulator listener to be addedSimulator.addSimulatorListener(ca.nengo.sim.SimulatorListener)protected void fireSimulatorEvent(SimulatorEvent event)
event - public void removeSimulatorListener(SimulatorListener listener)
removeSimulatorListener in interface Simulatorlistener - A Simulator listener to be removedSimulator.removeSimulatorListener(ca.nengo.sim.SimulatorListener)public void addChangeListener(VisiblyMutable.Listener listener)
addChangeListener in interface VisiblyMutablelistener - Listener to addVisiblyMutable.addChangeListener(ca.nengo.util.VisiblyMutable.Listener)public void removeChangeListener(VisiblyMutable.Listener listener)
removeChangeListener in interface VisiblyMutablelistener - Listener to removeVisiblyMutable.removeChangeListener(ca.nengo.util.VisiblyMutable.Listener)
public Simulator clone()
throws java.lang.CloneNotSupportedException
clone in interface Simulatorclone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic static Node[] collectNodes(Node[] startingNodes)
public static Node[] collectNetworkArraysForGPU(Node[] startingNodes)
public static Projection[] collectProjections(Node[] startingNodes,
Projection[] startingProjections)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||