User:Carl Boettiger/Notebook/Stochastic Population Dynamics/2010/02/23
Stochastic Population Dynamics | Main project page Previous entry Next entry |
Comparing to Analytic DynamicsGoal for today: implement analytic calculations for warning signals.
Abstraction/functionalizing code.
Implement GSL ode solvers for linear noise approximation: Recall our dynamics are [math]\displaystyle{ b(n) = \frac{e K n^2}{h^2+n^2} }[/math] [math]\displaystyle{ d(n) = e n + a }[/math] and defining the jump moments (van Kampen) [math]\displaystyle{ \alpha_1(n) = b(n)-d(n) }[/math] [math]\displaystyle{ \alpha_2 (n) = b(n)+d(n) }[/math]
[math]\displaystyle{ \frac{d}{dt} \sigma^2_n = 2 \sigma_2(n) \frac{d}{dn} \alpha_1(n) + \alpha_2(n) }[/math]
svn logr22 | cboettig | 2010-02-23 23:45:12 -0800 (Tue, 23 Feb 2010) | 1 line Implemented ode functions solving the linear noise approximation equations. Mean agrees well, variance calculation seems off. r21 | cboettig | 2010-02-23 11:39:25 -0800 (Tue, 23 Feb 2010) | 2 lines gillespie.h and gillespie.c abstraction completed. Documentation should still explain how to create the necessary functions to run a gillespie simulation, but is otherwise complete. r20 | cboettig | 2010-02-23 10:30:03 -0800 (Tue, 23 Feb 2010) | 2 lines Functionalizing code into seperate files. The main gillespie code has been broken off into its own file, gillespie.c along with its own header. To keep the function calls agnostic to the details of the parameters structure, all the gillespie functions my_pars is passed as a void pointer and promoted to a pars pointer inside the function defs.
|