What does "Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated" mean?


#1

My code now generates this warning. It still runs but I would like to understand why and if there is a way to make Julia happy and have the warning go away. I am using the latest Julia on Atom, on Windows 10.

Code is after the warning.

└ @ OrdinaryDiffEq C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:415
┌ Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated, use `BinaryMinHeap(xs)` instead.
│   caller = tstop_saveat_disc_handling at solve.jl:389 [inlined]
└ @ Core C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:389
┌ Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated, use `BinaryMinHeap(xs)` instead.│   caller = #__init#203(::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Float64, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Int64, ::Rational{Int64}, ::Int64, ::Rational{Int64}, ::Rational{Int64}, ::Bool, ::Int64, ::Nothing, ::Nothing, ::Int64, ::Float64, ::Float64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(DiffEqBase.__init), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Tuple{Int64,Float64,Int64,Int64,Float64,Float64,Int64,Float64,Float64,Float64,Int64,Int64},FoodChain{getfield(Main, Symbol("##17#18")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.StandardODEProblem}, ::Rosenbrock23{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at solve.jl:407
└ @ OrdinaryDiffEq C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:407
┌ Warning: `binary_minheap(xs::AbstractVector{T}) where T` is deprecated, use `BinaryMinHeap(xs)` instead.│   caller = #__init#203(::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Float64, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Int64, ::Rational{Int64}, ::Int64, ::Rational{Int64}, ::Rational{Int64}, ::Bool, ::Int64, ::Nothing, ::Nothing, ::Int64, ::Float64, ::Float64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(DiffEqBase.__init), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Tuple{Int64,Float64,Int64,Int64,Float64,Float64,Int64,Float64,Float64,Float64,Int64,Int64},FoodChain{getfield(Main, Symbol("##17#18")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.StandardODEProblem}, ::Rosenbrock23{0,true,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at solve.jl:415
└ @ OrdinaryDiffEq C:\Users\Helga\.julia\packages\OrdinaryDiffEq\7mKtS\src\solve.jl:415
using DifferentialEquations
f = @ode_def_bare FoodChain begin
dBB = r*(1- BB/K)*BB -xI*yIB*BI*((BB^h/(B0^h + BB^h))/eIB)
dBI = -xI*BI + xI*yIB*BI*(BB^h/(B0^h + BB^h))-xT *yTI*BT*((BI^h/(B0^h + BI^h))/eTI)
dBT = -xT*BT + xT*yTI*BT*(BI^h/(B0^h + BI^h))-q*BT*E
end K r yIB yTI eIB eTI B0 h xI xT q E
u0 = [500.0,200.0,100.0]
tspan = (0.0,1000.0)
p = (450, 1.1, 10, 10, 0.66, 0.85, 80, 1.2, 0.15, 0.06, 0, 0)
# K r yIB yTI eIB eTI B0 h xI xT q E
prob = ODEProblem(f,u0,tspan,p)
sol=solve(prob,Rosenbrock23())

using Plots

plot(sol, title = "Food Chain Pristine", xlabel = "Time" ,ylabel = "Density", lw=0.5)

#2

The warning happens in OrdinaryDiffEq and is thus not a consequence of your user code. Either OrdinaryDiffEq needs an update, or you must run ] up to update your installed version of OrdinaryDiffEq

Edit: I created an issue in OrdinaryDiffEq to track progress. It is indeed OrdinaryDiffEq that requires an update.


#3

Thank you!


#4

Hopefully this PR solves the problem

Edit: This PR has now been merged and the warning should go away if you temporarily check out master branch
] add OrdinaryDiffEq#master


#5

Yup this was fixed. DataStructures.jl updated and deprecated a feature we used, so we changed according to their deprecation and there should be a new version out which doesn’t throw the warning. Release should be fine now, so there shouldn’t be a need to ] add OrdinaryDiffEq#master


#6

I ran ] add OrdinaryDiffEq#master yesterday - is this okay or could it cause problems down the road? I don’t understand what #master does.


#7

] add OrdinaryDiffEq#master checks out the master branch of the repository. This branch will in general have slightly worse guarantees of working well together with other packages, so if you want to have a hassle-free environment, you can now ] add OrdinaryDiffEq to check out the latest tagged release (you might have to ] update first).


#8

] add OrdinaryDiffEq#master will get you our current in-development code before it’s released. Of course, that should be done with caution, but if you want the bleeding edge it’s there.