First, remember that normal distribution can produce nonsense values (too large in one direction and you get a monster psp, too large in the other direction and you get a psp with negative synaptic conductance).
You want simulation execution to go like this (in very crude "event-driven pseudocode"):
Code: Select all
at some interval before synaptic activation, set the synaptic weight to a new value
at the time of synaptic activation, activate the synapse
A. Implement your model with an ExpSyn or Exp2Syn driven via a NetCon by a NetStim. The NetStim should be set up to generate events with the desired start time (call this trainstart) and ISI. Set the NetCon's delay to 0, so the synapse will be activated at
trainstart + i*ISI where i = 0, 1, 2 . . .
B. Write a proc named setweight() that does these things:
--calls a func that returns a random value
--assigns this value to the weight of the NetCon
--uses the CVode class's event() method to call setweight() at t+ISI. By which I mean the algebraic expression "t+ISI".
C. Write an FInitializeHandler that calls setweight() at trainstart-1 (i.e. 1 ms before the first event from the NetStim is delivered to the synaptic mechanism).
Then the flow of simulation execution will be as follows:
1. At the end of initialization, a cvode event will be launched that will return at trainstart-1.
2. At t == trainstart-1, this event will return, causing setweight() to be called.
setweight() will set the NetCon's weight to a new random value, and launch a new cvode event that will return at trainstart-1+ISI (i.e. 1 ms before the arrival of the 2nd event from the NetStim).
3. At t == trainstart, the event from the NetStim will be delivered to the synaptic mechanism.
4. At t == trainstart-1+ISI (1 ms before the arrival of the 2nd event from the NetStim), the second cvode event returns, causing setweight() to be called.
setweight() does _______________ (you fill in the blanks)
Documentation of the CVode and FInitializeHandler class is in the Programmer's Reference, and examples of the use of cvode.event and FInitializeHandlers are scattered throughout this Forum (which is searchable).