Hi, I tried the first tutorial: "Optimizing parameters of an ODE for an Optimal Control Problem. I executed all the functions up to and including "p = [1.5, 1.0, 3.0, 1.0]. Then I typed:
prob = ODEProblem(lotka_volterra, u0, tspan, p)
and got the following error message, which I cannot figure out.
I am using Julia 1.4 (perhaps that is the reason?)
julia> prob = ODEProblem(lotka_volterra, u0, tspan, p)
soERROR: l MethodError: no method matching promote_tspan(::Array{Float64,1})
Closest candidates are:
promote_tspan(::Nothing) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/problem_utils.jl:9
promote_tspan(::Tuple{T,S}) where {T, S} at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/problem_utils.jl:7
promote_tspan(::Number) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/problem_utils.jl:8
…
Stacktrace:=
[1] ODEProblem{true,tType,isinplace,P,F,K,PT} where PT where K where F where P where isinplace where tType(::ODEFunction{true,typeof(lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::DiffEqBase.StandardODEProblem; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/ode_problems.jl:34
[2] ODEProblem{true,tType,isinplace,P,F,K,PT} where PT where K where F where P where isinplace where tType(::ODEFunction{true,typeof(lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::DiffEqBase.StandardODEProblem) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/ode_problems.jl:34 (repeats 2 times)
[3] ODEProblem(::ODEFunction{true,typeof(lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/ode_problems.jl:72
[4] ODEProblem(::ODEFunction{true,typeof(lotka_volterra),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/ode_problems.jl:72
[5] ODEProblem(::Function, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/ode_problems.jl:76
[6] ODEProblem(::Function, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}) at /Users/erlebach/.julia/packages/DiffEqBase/LNYfU/src/problems/ode_problems.jl:76
[7] top-level scope at none:0