The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This vignette illustrates the use of V-approximation to approximate the value function of a 2-D deterministic Lotka-Volterra (prey-predator) system.
This example, adapted from Joshua Abbot, is described in the
LV dataset.
## 2-D Deterministic: Prey--Predator example
data("LV")
lvspace <- aproxdef(
deg = c(20, 20),
lb = c(0.1, 0.1),
ub = c(1.5, 1.5),
delta = 0.03
)
vCLV <- vaprox(
lvspace,
LV$lvaproxdata[, c("xs", "ys")],
LV$lvaproxdata[, c("xdot", "ydot")],
LV$lvaproxdata[, "wval"]
)
lvsim <- vsim(vCLV,LV$lvsimdata[,c('xs','ys')])
# plot Biomass
plot(LV$lvsimdata[,"tseq"], LV$lvsimdata[,"xs"], type='l', lwd=2, col="blue",
xlab="Time",
ylab="Biomass")
lines(LV$lvsimdata[,"tseq"], LV$lvsimdata[,"ys"], lwd=2, col="red")
legend("topright", c("Prey", "Predator"), col=c("blue", "red"),
lty=c(1,1), lwd=c(2,2), bty="n")
# plot shadow (accounting) prices
plot(LV$lvsimdata[,"tseq"],lvsim[["shadowp"]][,1],type='l', lwd=2, col="blue",
ylim = c(-8,7),
xlab="Time",
ylab="Shadow price")
lines(LV$lvsimdata[,"tseq"],lvsim[["shadowp"]][,2], lwd=2, col="red")
legend("topright", c("Prey", "Predator"), col=c("blue", "red"),
lty=c(1,1), lwd=c(2,2), bty="n")
# plot inclusive weath and value function
plot(LV$lvsimdata[,"tseq"],lvsim[["iw"]],type='l', lwd=2, col="blue",
ylim = c(-0.5,2.5),
xlab="Time",
ylab="Inclusive Wealth / Value Function ($)")
lines(LV$lvsimdata[,"tseq"],lvsim[["vfun"]], lwd=2, col="red")
legend("topright", c("Inclusive Wealth", "Value Function"),
col=c("blue", "red"), lty=c(1,1), lwd=c(2,2), bty="n")These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.