diff --git a/src/remake.jl b/src/remake.jl index 36fe6e28c..cc826636d 100644 --- a/src/remake.jl +++ b/src/remake.jl @@ -63,6 +63,11 @@ function remake(prob::AbstractSciMLProblem; u0 = missing, _remake_internal(prob; kwargs..., u0, p) end +function remake(prob::AbstractIntervalNonlinearProblem; p = missing, interpret_symbolicmap = true, use_defaults = false, kwargs...) + _, p = updated_u0_p(prob, [], p; interpret_symbolicmap, use_defaults) + _remake_internal(prob; kwargs..., p) +end + function remake(prob::AbstractNoiseProblem; kwargs...) _remake_internal(prob; kwargs...) end diff --git a/test/remake_tests.jl b/test/remake_tests.jl index b2817b42b..5d79bdc11 100644 --- a/test/remake_tests.jl +++ b/test/remake_tests.jl @@ -265,3 +265,11 @@ u0 = [1.0; 2.0; 3.0] tspan = (0.0, 100.0) prob = ODEProblem(lorenz!, u0, tspan, nothing) @test_nowarn remake(prob, p = (), interpret_symbolicmap = true) + +# IntervalNonlinearProblem doesn't have a u0 +# Issue#726 +interval_f(u, p) = u * u - 2.0 + p[1] +uspan = (1.0, 2.0) +prob_int = IntervalNonlinearProblem(interval_f, uspan) +prob2 = @inferred IntervalNonlinearProblem remake(prob_int; p = [0]) +@test prob2.p == [2]