nengo-1.4
nengo-1.4 copied to clipboard
Adding nodes to a network array does not work
Adding a node to a network array through the UI will prompt "NODE was removed from network". The node will not be visible, but attempting to add a node of the same name (as the previous node) will prompt the "node exists, rename node" dialog box (meaning it is in the system somewhere).
We have found the cause of this bug being the overwritten getNodes() function in the network array class.
Essentially, nodes are being added to the network, but when the UI goes to get a new list of nodes, the getNodes function returns a node list internal to NetworkArray, and not the list internal to NetworkImpl. The reason for this distinction is to afford the ability to return the nodes in order, whereas the default getNodes function in NetworkImpl does not guarantee any order.
Terry's suggestion is to leave the overwritten function as is, and add an AddNode function which throws an exception when attempting to add a node to a NetworkArray.
Question to users: Do you foresee any situations where you would want to manually add a node to a NetworkArray? Be mindful that the NetworkArray is meant to emulate an ensemble, and when we add nodes to an ensemble, we regenerate the entire thing.
Also notice that we never "add nodes" to an ensemble -- instead we have a totally separate process for changing the number of neurons (and regenerating the whole thing).
I think an error should be thrown and that NetworkArrays should not be things you can add to... should we change the icon of network arrays?