lv_sens.ode
Adjoint method for the Lotka-Volterra ODE (predator-prey) using analytic model derivatives.
Forward ODE:
Functions
|
Propagator of Lotka-Volterra system discretized with semi-implicit Euler method. |
|
Partial derivative of ODE propagation operator with respect to the parameter, theta. |
|
Partial derivative of ODE propagation operator with respect to the state, x. |
|
Solve ODE. |
- lv_sens.ode.LV(x: ndarray[Any, dtype[float64]], theta: ndarray[Any, dtype[float64]], dt: float) ndarray[Any, dtype[float64]] [source]
Propagator of Lotka-Volterra system discretized with semi-implicit Euler method.
Continuous ODE:
\[\begin{split}\frac{dx}{dt} = \alpha x - \beta xy \\ \frac{dy}{dt} = xy - \delta y\end{split}\]Time-discretized ‘propagator’ form:
\[u_{n+1} = \mathcal{N}(u_n)\]with the state \(u_n = (x_n^T,\ y_n^T)\) and
\[\begin{split}\mathcal{N}(u_n) = \left[I - \tau \begin{pmatrix}\alpha & -\beta x\\y & -\delta\end{pmatrix}\right]^{-1} u_n\end{split}\]- Parameters:
x – current state at time t
theta – parameter
dt – time step
- Returns:
state at the next time step
- lv_sens.ode.LV_da(x: ndarray[Any, dtype[float64]], theta: ndarray[Any, dtype[float64]], dt: float) ndarray[Any, dtype[float64]] [source]
Partial derivative of ODE propagation operator with respect to the parameter, theta.
- Parameters:
x – current state at time t
theta – parameter
dt – time step
- Returns:
derivative of function evaluated in (x, theta, t)
- lv_sens.ode.LV_dx(x: ndarray[Any, dtype[float64]], theta: ndarray[Any, dtype[float64]], dt: float) ndarray[Any, dtype[float64]] [source]
Partial derivative of ODE propagation operator with respect to the state, x.
- Parameters:
x – current state at time t
theta – parameter
dt – time step
- Returns:
derivative of function evaluated in (x, theta, t)