Dear all, thank you in advance, for all the information which ANNarchy team have given me.
I try to develop a simple model of competitive learning but I have two questions:
1. I want set the inputs to population1(spiking neurons) periodically in a fixed duration trials. I am using SpikeSourceArray to set the inputs, Can it be done as follows?

spikeTrain = getSpikeTrain(nNeurons)
sTrain = SpikeSourceArray(spikeTrain)
learP = Population(nNeurons, neuron=ann.IF_cond_alpha)
projlpNet = Projection(pre=sTrain, post=learP, target='exc', synapse = STDP)
projlpNet.connect_all_to_all(weights=1.0)
compile()
for trial in range(10):
sTrain.spike_times = getSpikeTrain(nNeurons)
simulate(5.0)
2. I want to develop a competitive learning model as (Masquelier et al. 2009) but I do not know if the next model can be implemented in ANNarchy:
(see attachment picture)
As the picture show, a set of spike trains (may be generated through SpikeSourceArray) are the inputs to a population of neurons, then, if a neuron fires, it sends a inhibitory postsynaptic potential to its neighbors. The next code doesn't work correctly, and I believe that is wrong. Can I implementing this recurrent inhibitory behaviour in ANNarchy?
spikeTrain = getSpikeTrain(nNeurons)
sTrain = SpikeSourceArray(spikeTrain)
learP = Population(nNeurons, neuron=IF_cond_alpha)
projlpNet = Projection(pre=sTrain, post=learP, target='exc', synapse = STDP)
projlpNet.connect_all_to_all(weights=1.0)
projlpNet = Projection(pre=learP, post=learP, target='inh', synapse = STDP)
projlpNet.connect_all_to_all(weights=1.0)
Could you help me with the above questions?
Thanks again to all,
All the best,