random variables and simulation speed
Posted: Fri Feb 09, 2007 6:11 am
Hi,
I've been playing around with random number generators, both within mod files and hoc files (in the latter case, I introduced a noisy current with the play command of the Random class).
I every case, I'm obtaining weird behaviours that I will try to explain:
- When using fixed timestep (cvode.active(0)) the simulation gets slower and slower as it runs. To give you an idea, the first 1000 ms are calculated in ~2.2 seconds; the second 1000 ms, in ~2.8 s; then in ~3.5 s. My simulations are 80 seconds long, so you can imagine how slow the simulation turns when reaching the end.
- If I set cvode.active(1), I can not see any randomness in the simulation, it's as if there were no random current at all.
I have seen more or less the same behaviour regardless of wether the 'randomness' lies within a .mod mechanism or at the hoc level.
IMPORTANT UPDATE: I am seeing the slow down of the simulation even without the random current (when cvode.active is 0), so it seems that this is my principal problem. Why does it happen?
Thanks.
I've been playing around with random number generators, both within mod files and hoc files (in the latter case, I introduced a noisy current with the play command of the Random class).
I every case, I'm obtaining weird behaviours that I will try to explain:
- When using fixed timestep (cvode.active(0)) the simulation gets slower and slower as it runs. To give you an idea, the first 1000 ms are calculated in ~2.2 seconds; the second 1000 ms, in ~2.8 s; then in ~3.5 s. My simulations are 80 seconds long, so you can imagine how slow the simulation turns when reaching the end.
- If I set cvode.active(1), I can not see any randomness in the simulation, it's as if there were no random current at all.
I have seen more or less the same behaviour regardless of wether the 'randomness' lies within a .mod mechanism or at the hoc level.
IMPORTANT UPDATE: I am seeing the slow down of the simulation even without the random current (when cvode.active is 0), so it seems that this is my principal problem. Why does it happen?
Thanks.