Skip to content

Commit 6aab793

Browse files
committed
Disable reinit on LSO cache
1 parent 1663669 commit 6aab793

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/src/tutorials/optimizing_parameterized_ode.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ sol = solve(prob, Tsit5(); saveat = tsteps)
3434
# Plot the solution
3535
using Plots
3636
plot(sol; linewidth = 3)
37-
savefig("LV_ode.png")
3837
```
3938

4039
Let us now formulate the parameter estimation as a Nonlinear Least Squares Problem.

ext/NonlinearSolveLeastSquaresOptimExt.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ import LeastSquaresOptim as LSO
1616
end
1717
end
1818

19-
# TODO: Implement reinit
2019
@concrete struct LeastSquaresOptimJLCache
2120
prob
2221
alg
2322
allocated_prob
2423
kwargs
2524
end
2625

26+
function SciMLBase.reinit!(cache::LeastSquaresOptimJLCache, args...; kwargs...)
27+
error("Reinitialization not supported for LeastSquaresOptimJL.")
28+
end
29+
2730
function SciMLBase.__init(prob::Union{NonlinearLeastSquaresProblem, NonlinearProblem},
2831
alg::LeastSquaresOptimJL, args...; alias_u0 = false, abstol = nothing,
2932
show_trace::Val{ShT} = Val(false), trace_level = TraceMinimal(), reltol = nothing,

0 commit comments

Comments
 (0)