Random number seed for stochastic channels?
Posted: Mon Dec 15, 2008 8:34 pm
Using the Channel Builder, I constructed a stochastic single channel simulator. How does one apply random number seeds to this simulation?
The NEURON Forum
https://www.neuron.yale.edu/phpBB/
Of course, this raised the question of whether NetStims draw from a common pseudorandom generator, and it turns out that they do. However, it is fairly straightforward to associate each NetStim with its own generator that is independent of any others--seehines wrote:the KSChan instance sharing of random indices
A program that sets up a model and then uses that model in a series of simulations should be organized in this order:victoriadl wrote:Where in the code do I have to put KSChan.rseed(i) in the channel builder?
Code: Select all
// run $1 simulations
proc nrun() { local i
if ($1>0) {
for i=0,$1-1 run()
}
}
Code: Select all
// run $1 identical simulations, each using random seed specified by the second argument
proc nrun() { local i
if ($1>0) {
KSChan[0].rseed($2)
for i=0,$1-1 run()
}
}
Code: Select all
proc batrun() { local i
for i=0,$o1.size()-1 {
KSChan[0].rseed($o1.x[i])
run()
}
}
batrun(svec)