diff --git a/src/remake.jl b/src/remake.jl index 31d013964..f7e48afce 100644 --- a/src/remake.jl +++ b/src/remake.jl @@ -824,6 +824,9 @@ function remake(prob::SCCNonlinearProblem; u0 = missing, p = missing, probs = mi if probs === missing probs = prob.probs end + if explicitfuns! === missing + explicitfuns! = prob.explictfuns! + end offset = 0 if u0 !== missing || p !== missing && parameters_alias probs = map(probs) do subprob diff --git a/test/downstream/modelingtoolkit_remake.jl b/test/downstream/modelingtoolkit_remake.jl index 00cb97d46..b7bfa5fe5 100644 --- a/test/downstream/modelingtoolkit_remake.jl +++ b/test/downstream/modelingtoolkit_remake.jl @@ -321,6 +321,7 @@ end @test state_values(sccprob2) ≈ 2ones(3) @test sccprob2.probs[1].u0 ≈ 2ones(2) @test sccprob2.probs[2].u0 ≈ 2ones(1) + @test sccprob2.explicitfuns! !== missing sccprob3 = remake(sccprob; p = [σ => 2.0]) @test sccprob3.p === sccprob3.probs[1].p