Differential equation solver example gives an error: MethodError: no method matching OrdinaryDiffEq.DEOptions

Dear All,

I run the sample code to solve a differential equation from tutorial.

const p0 = 0.2; const q0 = 0.3; const v0 = 1; const d0 = 5
const p1 = 0.2; const q1 = 0.3; const v1 = 1; const d1 = 1
const d2 = 1; const beta0 = 1; const beta1 = 1; const tau = 1
function bc_model(du,u,h,p,t)
  du[1] = (v0/(1+beta0*(h(p, t-tau)[3]^2))) * (p0 - q0)*u[1] - d0*u[1]
  du[2] = (v0/(1+beta0*(h(p, t-tau)[3]^2))) * (1 - p0 + q0)*u[1] +
          (v1/(1+beta1*(h(p, t-tau)[3]^2))) * (p1 - q1)*u[2] - d1*u[2]
  du[3] = (v1/(1+beta1*(h(p, t-tau)[3]^2))) * (1 - p1 + q1)*u[2] - d2*u[3]
end
lags = [tau]
h(p, t) = ones(3)
tspan = (0.0,10.0)
u0 = [1.0,1.0,1.0]
prob = DDEProblem(bc_model,u0,h,tspan; constant_lags=lags)
alg = MethodOfSteps(Tsit5())
sol = solve(prob,alg)

however, I directly get an error saying:
MethodError: no method matching OrdinaryDiffEq.DEOptions

I cannot google it find a method to solve this issue. Can anyone give any suggestion?

Thank you very much!

Peter

Which version of Julia and which version of the package are you using?

I install julia 1.02 today and use Pkg.add(“DifferentialEquations”) to install the package.

I think it should be the latest one.

1 Like

Besides, I also face the problem in JualiaBox… I cannot figure out what’s going on.

Error in Jupyter notebook shows below, feel frustrated… any help is appreciated

MethodError: no method matching OrdinaryDiffEq.DEOptions(::Int64, ::Int64, ::Bool, ::Bool, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::Nothing, ::DataStructures.BinaryHeap{Float64,DataStructures.LessThan}, ::DataStructures.BinaryHeap{Float64,DataStructures.LessThan}, ::DataStructures.BinaryHeap{Discontinuity{Float64},DataStructures.LessThan}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Discontinuity{Float64},1}, ::Nothing, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Bool, ::Bool, ::Float64, ::Float64, ::Float64, ::Bool, ::Bool, ::Bool, ::CallbackSet{Tuple{},Tuple{}}, ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool)
.....

Hi, after I delete everything related with Julia and reinstall it, I solve this problem…

Although I still cannot run this differential sample program on Juliabox ( Pkg.add(“DifferentialEquations”) already ), I run it successfully on PC.

IIRC, JuliaBox and JuliaPro use their own package registry. This gives some of the DiffEq parts incompatible package sets and breaks it. There’s not much we can do on the DiffEq side to fix this other than get that registry updated.

4 Likes

Thank you very much!