Skip to content

Confusing warning with default settings #148

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
elbert5770 opened this issue Feb 7, 2023 · 0 comments · Fixed by SciML/DifferentialEquations.jl#935
Closed

Confusing warning with default settings #148

elbert5770 opened this issue Feb 7, 2023 · 0 comments · Fixed by SciML/DifferentialEquations.jl#935

Comments

@elbert5770
Copy link

This simple example without supplying an alg but iip = true seems to switch to SteadyStateProblem, asks for using DifferentialEquations, then complains that the method is deprecated and that NonlinearSolve should be used.

using NonlinearSolve
using DifferentialEquations

function sys(sto, x, p)
    @show x
    x1 = x[1]
    x2 = x[2]
    p1 = p[1]
    p2 = p[2]
    sto[1] = x1/p2 - x2/p1
    sto[2] = 100.0 - p1*x1 - p2*x2
    @show sto
    return sto
end


a=0
p = [0.5,0.5]
x = [1.0,1.0]
#du = similar(p)
probN = NonlinearProblem{true}(sys,x, p)

sol = solve(probN)
@show sol
sto = similar(p)
@show sys(sto,sol.u,p)

gives the following warning:

┌ Warning: This method is deprecated in favor of using NonlinearSolve.jl. Note that an ODEProblem
│ can be converted into a steady state NonlinearProblem via
│ `NonlinearProblem(prob::ODEProblem)`. The algorithm `NLSolveJL` as part of the
│ SciMLNLSolve.jl set of nonlinear solvers for NonlinearSolve.jl is equivalent to
│ SteadyStateDiffEq.jl's default `SSRootfind` (with a few improvements).
│ 
│ See [the documentation of NonlinearSolve.jl](https://docs.sciml.ai/NonlinearSolve/stable/)
│ for more details.
└ @ SteadyStateDiffEq C:\Users\elber\.julia\packages\SteadyStateDiffEq\1di7r\src\solve.jl:8
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant