Hi!
I am new to Julia and I’m trying to fit my data to a DDE, but have a problem with optimize()
. It is not recognized, here is my code, and the error.
I would appreciate if anyone could provide a toy example for how to estimate parameters of a DDE.
Thank you!
############### The error ####################
Inappropriate solve command. The arguments do not make sense. Likely, you gave an algorithm which does not actually exist (or does not <:DiffEqBase.DEAlgorithm)
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] #__solve#1(::Bool, ::Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:maxiters,),Tuple{Int64}}}, ::Function, ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(pg2),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::LinRange{Float64}) at C:\Users\farna.julia\packages\DifferentialEquations\SubON\src\default_solve.jl:3
[3] (::getfield(DiffEqBase, Symbol(“#kw##__solve”)))(::NamedTuple{(:maxiters,),Tuple{Int64}}, ::typeof(DiffEqBase.__solve), ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(pg2),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::LinRange{Float64}) at .\none:0
[4] #solve#456(::Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:maxiters,),Tuple{Int64}}}, ::Function, ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(pg2),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::LinRange{Float64}) at C:\Users\farna.julia\packages\DiffEqBase\6ewdP\src\solve.jl:41
[5] (::getfield(DiffEqBase, Symbol(“#kw##solve”)))(::NamedTuple{(:maxiters,),Tuple{Int64}}, ::typeof(solve), ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Array{Float64,1},DDEFunction{true,typeof(pg2),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::LinRange{Float64}) at .\none:0
[6] (::getfield(DiffEqParamEstim, Symbol(“##29#34”)){Nothing,Bool,Int64,typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR),Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:maxiters,),Tuple{Int64}}},DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(pg2),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},LinRange{Float64},DataFrames.DataFrame,Tsit5})(::Array{Float64,1}) at C:\Users\farna.julia\packages\DiffEqParamEstim\mNjO8\src\build_loss_objective.jl:42
[7] (::DiffEqObjective{getfield(DiffEqParamEstim, Symbol(“##29#34”)){Nothing,Bool,Int64,typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR),Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:maxiters,),Tuple{Int64}}},DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(pg2),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},LinRange{Float64},DataFrames.DataFrame,Tsit5},getfield(DiffEqParamEstim, Symbol(“##33#39”))})(::Array{Float64,1}) at C:\Users\farna.julia\packages\DiffEqParamEstim\mNjO8\src\build_loss_objective.jl:24
[8] #optimize#8(::Symbol, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::DiffEqObjective{getfield(DiffEqParamEstim, Symbol(“##29#34”)){Nothing,Bool,Int64,typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR),Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:maxiters,),Tuple{Int64}}},DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(pg2),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},LinRange{Float64},DataFrames.DataFrame,Tsit5},getfield(DiffEqParamEstim, Symbol(“##33#39”))}, ::Array{Float64,1}, ::Dogleg{LeastSquaresOptim.QR}) at C:\Users\farna.julia\packages\LeastSquaresOptim\Wvhro\src\types.jl:141
[9] optimize(::Function, ::Array{Float64,1}, ::Dogleg{LeastSquaresOptim.QR}) at C:\Users\farna.julia\packages\LeastSquaresOptim\Wvhro\src\types.jl:141
[10] top-level scope at In[15]:30