Unable to reproduce a simple bifurcation diagram

You can use a larger dsmax:

diagram = bifurcationdiagram(prob,PALC(), 2, ContinuationPar(opts, max_steps = 150000, dsmax = 0.7))

The issue here is that the range of values of ConwayPerelson_2015 is pretty large. I would be better numerically to rescale the model (log or other).

A non-existent hopf point is being predicted, very close to the point where a simple fold bifurcation is known to exist (see the StackTrace below).

You can see

julia> diagram[2]
[Bifurcation diagram]
 ┌─ From 1-th bifurcation point.
 ├─ Children number: 0
 └─ Root (recursion level 2)
      ┌─ Curve type: EquilibriumCont from Transcritical bifurcation point.
      ├─ Number of points: 150001
      ├─ Type of vectors: Vector{Float64}
      ├─ Parameter m starts at 0.6087056695593298, ends at 0.7526129563574361
      ├─ Algo: MoorePenrose
      └─ Special points:

- #  1,       bp at m ≈ +0.40983773 ∈ (+0.40983773, +0.40983773), |δp|=5e-12, [converged], δ = ( 1,  0), step = 225
- #  2,       bp at m ≈ +0.83909847 ∈ (+0.83909847, +0.83909847), |δp|=9e-16, [converged], δ = ( 1,  0), step = 35762
- #  3,     hopf at m ≈ +0.83853493 ∈ (+0.83853493, +0.83853493), |δp|=2e-09, [converged], δ = (-2, -2), step = 40644
- #  4, endpoint at m ≈ +0.75261202,  

It seems the Hopf bifurcation is not a fluke. See

julia> eigenvals(diagram[2].γ, 40644)
5-element Vector{ComplexF64}:
 -2.0506719532705528e-10 - 0.005389356755654721im
 -2.0506719532705528e-10 + 0.005389356755654721im
   -0.000499605123267488 + 0.0im
     -2.8970614512243027 + 0.0im
     -24.290528399220722 + 0.0im

julia> eigenvals(diagram[2].γ, 40645)
5-element Vector{ComplexF64}:
 -1.2226521003841756e-7 - 0.005389880502352536im
 -1.2226521003841756e-7 + 0.005389880502352536im
 -0.0004996051977692838 + 0.0im
    -2.8970638500412025 + 0.0im
     -24.29052805667206 + 0.0im

julia> eigenvals(diagram[2].γ, 40643)
5-element Vector{ComplexF64}:
  8.657536849168388e-8 - 0.005388984365665424im
  8.657536849168388e-8 + 0.005388984365665424im
 -0.000499605070280656 + 0.0im
   -2.8970597457475535 + 0.0im
    -24.29052864275146 + 0.0im
2 Likes