We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Here's all my code http://piratepad.net/2xM7ncaml1 (sorry it's a whopper but I guess you can use ctrl+f)
Please could someone tell me which line I should be looking at to temporarily switch off the output of animation, in order to speed up the model so I can record my model analysis measures for 38 experimental variants fast enough before my dissertation deadline?
Can I just comment out the line which finally outputs the animation?
As far as I know, input-output processes are the most computationally expensive and slowest, so I'm hoping if I temporarily switch it off while I don't need it, it'll make the whole program run much faster.
I'm a biology student not a CS student, hence I don't know these basic things. I could probably work this out on my own eventually, but I'm getting extremely close to my report deadline now, so would really appreciate your help.
Thank you!
Comments
I think line 756 is the one you want to comment out. It seems to be what's rendering the boids themselves.
There's also a lot of overhead in dealing with the UI... But cutting that out is probably more of a hassle than it's worth.
Thanks, I tried that, but it only stops rendering the info (boid population, framerate per second, etc.) and debug option (shows zone of social interaction, desired and steering vectors) in the output animation window. The rest of the animation still runs, which is most of it.
Found it: it was the render() call in line 96.
Thanks, sorted! I'm gonna time it with n without now n find out how much faster it is with outputting the animation turned off.
:-)
With animation render switched off, time to 10,000 timesteps - 4mins 37seconds
With animation on, all other factors equal - 7mins 50seconds
41% faster :)