nengo / nengo-gui

Nengo interactive visualizer
Other
97 stars 38 forks source link

Simulation doesn't read values from input slider on start #1016

Open dokato opened 5 years ago

dokato commented 5 years ago

Describe the bug

When I manipulate the value of the slider during the simulation everything is fine, but when I set the value and then press the play button afterwards, it doesn't react to the input.

To reproduce

  1. Take this model:
model = nengo.Network()
with model:
    a = nengo.Ensemble(n_neurons=10, dimensions = 1,
                       neuron_type=nengo.LIF())
    stim = nengo.Node(0)
    nengo.Connection(stim, a)
  1. Add the slider to the stim. Set stim to 1.

  2. Add graph showing the value of a.

  3. Run simulation.

Expected behavior

It should show value 1 on the a graph, it shows 0 instead.

Screenshots Screenshot 2019-06-10 at 11 53 05

Versions

astoeckel commented 5 years ago

Interesting! The current behaviour is that the value is reset at the begin of the simulation to whatever the initial value of the Node is. In this case you explicitly specified "0" as initial value.

I honestly don't know how this behaviour could be fixed without breaking other functionality.