Hi!
I am new to Julia and BifurcationKit. I am trying to perform a bifurcation analysis of the Jansen-Rit model as was done by Grimbert and Faugueras but I keep running into this error when calling continuation
The function iterate_from_two_points exists, but no method is defined for this combination of argument types.
Closest candidates are:
iterate_from_two_points(::ContIterable, ::Any, ::T, ::Any, !Matched::T; _verbosity) where T
@ BifurcationKit ~/.julia/packages/BifurcationKit/RaJtn/src/Continuation.jl:382
I have tried some of the tutorials on the BifurcationKit website, but this steps works fine. I am using Jupyter Notebook in VSCode if it makes a difference. If someone could provide some guidance I would greatly appreciate it!
Here is the full code:
using Revise, Plots
using BifurcationKit
const BK = BifurcationKit
# Define the function σ
function σ(v, e0 = 2.5, v0 = 6, r=0.56)
2 * e0 / (1 + exp(r * (v0 - v)))
end
# vector field
function jansenrit(z, param)
(;A, a, B, b, C1, C2, C3, C4, p) = param
y0, y3, y1, y4, y2, y5 = z
[
y3
A * a * σ(y1 - y2) - 2 * a * y3 - a^2 * y0
y4
A * a * (p + C2 * σ(C1 * y0)) - 2 * a * y4 - a^2 * y1
y5
B * b * C4 * σ(C3 * y0) - 2 * b * y5 - b^2 * y2
]
end
# parameter values
C= 135
par = (A = 3.25, a = 100, B = 22, b = 50, C1 = C, C2 = 0.8 * C, C3 = 0.25 * C, C4 = 0.25 * C, p = 50)
# initial condition
z0 = [0.0, 0.0, 15.0, 0.0, 10.0, 0.0]
# Bifurcation Problem
prob = BifurcationProblem(jansenrit, z0, par, (@optic _.p);
record_from_solution = (x, p; k...) -> (y0 = x[1], y3 = x[2], y1 = x[3], y4 = x[4], y2 = x[5], y5 = x[6]),)
opts_br = ContinuationPar(p_min =1.0, p_max = 400.0)
# continuation options, we limit the parameter range for p
opts_br = ContinuationPar(p_min =1.0, p_max = 400.0)
# continuation of equilibria
br = continuation(prob, PALC(), opts_br;
# we want to compute both sides of the branch of the initial
# value of p = 100
bothside = false, verbosity = 3)