Skip to content

Commit

Permalink
remake prob if # of params change
Browse files Browse the repository at this point in the history
  • Loading branch information
ivborissov committed Jan 2, 2024
1 parent 22807a8 commit 6f818a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ode_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ function remake_prob(scen::Scenario, params::NamedTuple; safetycopy=true)
params_total = merge_strict(scen.parameters, params)
u0, p0 = scen.init_func(params_total)
prob0.u0 .= u0
prob0.p .= p0
# tmp to if additional params are provided
length(prob0.p) == length(p0) ? prob0.p .= p0 : remake(prob0; p=p0)

return prob0
#return remake(prob0; u0=u0, p=p0)
#tmp. remake produces StackOverflow with EnsembleDistributed(), Julia 1.7 and SciMLBase >= 1.36.0
Expand Down

0 comments on commit 6f818a1

Please sign in to comment.