SciML / SciMLBase.jl

The Base interface of the SciML ecosystem
https://docs.sciml.ai/SciMLBase/stable
MIT License
119 stars 91 forks source link

Deprecation warning when converting `SteadyStateProblem` to `NonlinearProblem` #618

Closed oameye closed 4 months ago

oameye commented 5 months ago

When converting a SteadyStateProblem to a NonlinearProblem a deprecation warning is given coming from SciMLBase:

The use of keyword arguments `syms`, `paramsyms` and `indepsym` for `SciMLFunction`s is deprecated. Pass `sys = SymbolCache(syms, paramsyms, indepsym)` instead.
using SteadyStateDiffEq, ModelingToolkit, NonlinearSolve

@variables t x(t)
D = Differential(t)

eqs = [D(x) ~ x]

@named sys = ODESystem(eqs)
sys = structural_simplify(sys)

u0 = [x => 1.0]
p = []

prob = SteadyStateProblem(sys, u0, p)

NonlinearProblem(prob)
Status `\Project.toml`
  [961ee093] ModelingToolkit v8.75.0
  [8913a72c] NonlinearSolve v3.5.3
  [9672c7b4] SteadyStateDiffEq v2.0.1
avik-pal commented 4 months ago

@ChrisRackauckas is this a modelingtoolkit problem? the syms is populated here so the deprecation trigger makes sense

ChrisRackauckas commented 4 months ago

@AayushSabharwal can we remove it from adding this in the constructors?