Produces an object suitable to pass as the ressupply to spec_rescomp().

ressupply_logistic(r, k)

Arguments

r

A vector or rescomp_coefs_vector, with one number per resource. The intrinsic growth rate of each resource.

k

A vector or rescomp_coefs_vector, with one number per resource. The carrying capacity of each resource.

Value

S3 object of class rescomp_ressupply.

Examples

ressupply <- ressupply_logistic(r = rescomp_coefs_lerp(c(0.2, 0.3), c(0, 0), "growth_inhibition"), k = c(10, 20))
get_ressupply(ressupply, c(2, 10), list(growth_inhibition = 0))
#> [1] 0.32 1.50
get_ressupply(ressupply, c(20, 0), list(growth_inhibition = 0))
#> [1] -4  0
get_ressupply(ressupply, c(2, 10), list(growth_inhibition = 0.8))
#> [1] 0.064 0.300