Hello,
I have a serious bottleneck in terms of runtime in my simulations.
I have a modular cortical network and i need to 'manually' change weights in some
specific connections before i start the simulation.
The modularity means that this happens inside a for loop for all populations pairs.
so, before simulation starts i have a function that goes over all population pairs and
does this:
AMPA_conns = nest.GetConnections(source=pre_pop,target=post_pop,
synapse_model='AMPA_synapse_longrange') # RETRIEVE ALL AMPA CONNECTIONS BETWEEN
SOURCE AND TARGET POPULATION
nest.SetStatus(AMPA_conns, {'weight': pattern_weight}) # CHANGE CONNECTION
WEIGHT
NMDA_conns = nest.GetConnections(source=pre_pop,target=post_pop,
synapse_model='NMDA_synapse_longrange') # RETRIEVE ALL NMDA CONNECTIONS BETWEEN
SOURCE AND TARGET POPULATION
nest.SetStatus(NMDA_conns, {'weight': pattern_weight * nmda2ampa_ratio}) # CHANGE
CONNECTION WEIGHT
commenting out these 4 lines reduces my runtime by 8 hours.
for reference, the model consists of ~27000neurons, is created in 20 minutes (nodes
generated and connections drawn) and the actual simulation runs for about 15 minutes.
so my question is: is there a way to obtain the connection ids as i draw the connections
(right after the nest.Connect() function) so that i can store them in a data structure and
avoid this expensive operation of searching? or perhaps it is the setstatus that makes it
expensive?
*I havent yet migrated to nest v3, this concerns version 2.20.
thank you for your time!
angeliki