Skip to content

Commit ec32858

Browse files
committed
add tristable predator prey
1 parent 5bdcee2 commit ec32858

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PredefinedDynamicalSystems"
22
uuid = "31e2f376-db9e-427a-b76e-a14f56347a14"
33
repo = "https://github.com/JuliaDynamics/PredefinedDynamicalSystems.jl.git"
4-
version = "1.4"
4+
version = "1.5"
55

66
[deps]
77
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"

src/continuous_famous_systems.jl

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,3 +2138,44 @@ end
21382138
du4 = -d*x - d*y
21392139
return SVector{4}(du1, du2, du3, du4)
21402140
end
2141+
2142+
2143+
"""
2144+
tristable_predator_prey(u0; A, B, C, D, E)
2145+
2146+
A tristable predator prey model studied by Zeng and Yu[^Zeng2024],
2147+
given by
2148+
2149+
```math
2150+
\\begin{array}{rcl}
2151+
\\dot{x} & = & x(1-x)(x - E) - s y \\\\
2152+
\\dot{y} &=& y(sC - D) \\\\
2153+
\\mbox{where\\quad} s & = & x^2/(Ax^2 + Bx + 1)
2154+
\\end{array}
2155+
```
2156+
2157+
The parameter container has the parameters in the same order as stated in this
2158+
function's documentation string. Default values are:
2159+
```julia
2160+
A = 2.0551, B = −2.6, C = 0.4, D = 1.0, E = 0.4
2161+
```
2162+
2163+
[^Zeng2024]:
2164+
Yanni Zeng, Pei Yu (2024)
2165+
Multistable states in a predator–prey model with generalized Holling type III functional response and a strong Allee effect.
2166+
Communications in Nonlinear Science and Numerical Simulation, Volume 131, 107846
2167+
"""
2168+
function tristable_predator_prey(u0 = [0.5, 0.5]; A = 2.0551, B = 2.6, C = 0.4, D = 1.0, E = 0.4)
2169+
function zeng_yu_2024(u, p, t)
2170+
A, B, C, D, E = p
2171+
x, y = u
2172+
common = x^2/(A*x^2 + B*x + 1)
2173+
dx = x*(1 - x)*(x - E) - common*y
2174+
dy = y*(C*common - D)
2175+
return SVector(dx, dy)
2176+
end
2177+
p = [A,B,C,D,E]
2178+
diffeq = (abstol = 1e-9, rtol = 1e-9)
2179+
ds = CoupledODEs(zeng_yu_2024, u0, p; diffeq)
2180+
return ds
2181+
end

0 commit comments

Comments
 (0)