questions
Description
Unformatted Attachment Preview
The Lotka-Volterra predation model tracks changes in predator and prey populations. It consists of two
differential equations:
dV/dt = rV #VP = the rate of change of the prey population
dP/dt = acVP $P = the rate of change of the predator population
V = size of prey population
P = size of predator population
r = instantaneous rate of increase of the prey population
c = capture efficiency of the predator = the effect of the predator on the per capita growth of
the prey
a = assimilation efficiency of the predator = the ability of the predator to turn captured prey into
per capita growth
d = instantaneous death rate of the predator population
To use this model to track predator and prey populations you must solve for both differential equations.
Before you can do anything, load the solver package and ggplot2 (or tidyverse):
library(deSolve)
library(ggplot2)
Part A
1. Use the following scripts to enter, solve, and plot the Lotka-Volterra predation model when r=0.4,
c=0.005, a=0.1, d=0.2, V=400, and P=50
lv.pred=function(t,y,parms) {
V=y[1] # starting V
P=y[2] # starting P
with(as.list(p), {
dVdt=r*V-c*V*P # model for prey abundances and temporarily saves the results
dPdt=a*c*V*P-d*P # model for predator abundances and temporarily saves the results
return(list(c(dVdt,dPdt))) # returns the model results
}
)}
p
Purchase answer to see full
attachment
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."