Open Christian-B opened 2 years ago
I think I'd say no, because the set_number_of_neurons_per_core does specify which model (not Population) that you wish to do this for. So yes, I would iterate through all current Populations to find any matching the specified model and limit them too.
In all our examples we do set_number_of_neurons_per_core before creating the Populations
So sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 2) pop_1 = sim.Population(10, sim.IF_curr_exp(), label="pop_1")
Will result in 5 Machine Vertexes
But pop_1 = sim.Population(10, sim.IF_curr_exp(), label="pop_1") sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 2)
results in 1 Machine Vertex
So the questions is this the desired behaviour
If yes I suggest a warning if set_number_of_neurons_per_core is called after Population
If no on a set_number_of_neurons_per_cor iterate through all Populations to find any existing ones and limit them too.