Open
Description
(Discussed during Bernstein conference with @babsey @heplesser @terhorstd @poojanbabu)
In the future it may be desirable to support creating arbitrary nested groups of populations in NEST the way it is currently proposed for NEST Desktop on a Python level by @babsey. This would allow applying connection rules and e.g. weight values on a per-group-item level via a group item aware iterator as opposed to strictly flattened across all neuron in a NodeCollection.
Syntax brainstorming:
pop1 = nest.Create("iaf_psc_exp", 100)
pop2 = nest.Create("iaf_psc_exp", 200)
group1 = nest.Group([pop1, pop2])
# Retrieve:
pop1 = group1[0] // same as pop1
pop1_neuron0 = group1[0][0] // same as pop1[0]
nest.Connect(g1, g1, "all_to_all", syn_spec={"weight":[23, 25]})
// Would apply weight 23.0 to all connections from n1-> nX and 25.0 to n2->nX
// However, this could also be taken to mean n1->n1: 23.0 and n2->n2: 25.0. Needs a clearer syntax!
- Doing parameters purely as lists might get really messy and unclear, calls for named arg implementation.
- Some of the functionality already exists as part of composite node collections on a C++ level, but these are currently not exposed to the user.
- There might not be a need for an explicit
nest.Group
but some method or operator overload is needed to distinguish from the defaultn1 + n2
flattened collection addition. - While there's some similarities to pooling connections as done in exabrainprep this should be a conceptually independent change.