Dear Ryan,

Two approaches spring to mind:

1. You can simulate your network up until the time that you want the weights to change, update the weights manually, then continue simulating. Something like:

nest.SetStatus(my_connections, {"w": 1.})

2. You can write a custom synapse model that is based on a simple existing model, for example, models/static_synapse.h. The send() method is where presynaptic spikes arriving at the synapse are handled and sent on to the postsynaptic partner; this is (probably) the only function that you need to modify. You can inspect the time of the spike in this context by

SpikeEvent e_spike = static_cast< SpikeEvent& >( e );
const Time& t_spike = e.get_stamp();

Then you can simply do an if..then..else on t_spike, and set the weight on the event (e.set_weight()) according to your desired function.

Hope this helps, otherwise do let us know!

Kind regards,
Charl Linssen

On Thu, Apr 29, 2021, at 19:40, Ryan Rahy wrote:
Dear all,

I am trying to build a network where one of the connection weights changes according to a given function. I'm specifically looking for a step function, such that the weight would stay constant at a negative value until a given time point, where it would suddenly change to positive value. As far as I can tell, the existing synaptic models with plasticity cannot do this.

I'm trying to do this in order to model a rebound effect, where a neuron fires after being released form an inhibitory current. This effect takes place over a time scale of seconds in the circuit I'm studying, so using an existing model with built-in GABA-mediated rebound doesn't do the trick.

So is there a way to manually change a connection weight during the simulation? If not, is there some other way I could achieve the same effect in NEST?

Thanks in advance!

NEST Users mailing list --
To unsubscribe send an email to