Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix printing in some of the docs #331

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/basics/Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ the trace to see what is happening:

```@example tracing
solve(prob; show_trace = Val(true), trace_level = TraceAll(10))
nothing; # hide
```

You can also store the trace in the solution object:
Expand Down
11 changes: 10 additions & 1 deletion docs/src/tutorials/optimizing_parameterized_ode.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,23 @@ Now, we can use any NLLS solver to solve this problem.
```@example parameterized_ode
res = solve(nlls_prob, LevenbergMarquardt(); maxiters = 1000, show_trace = Val(true),
trace_level = TraceAll())
nothing # hide
```

```@example parameterized_ode
res
```

We can also use Trust Region methods.

```@example parameterized_ode
res = solve(nlls_prob, TrustRegion(); maxiters = 1000, show_trace = Val(true),
trace_level = TraceAll())
nothing # hide
```

```@example parameterized_ode
res
```

Let's plot the solution.
Expand All @@ -72,5 +82,4 @@ sol_fit = solve(prob2, Tsit5(); p = res.u)
sol_true = solve(prob2, Tsit5(); p = p)
plot(sol_true; linewidth = 3)
plot!(sol_fit; linewidth = 3, linestyle = :dash)
savefig("LV_ode_fit.png")
```
Loading