Skip to content
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Tutorials"
uuid = "cb10daa6-a5e5-4c25-a171-ae181b8ea3c9"
authors = ["Olivier Cots <olivier.cots@toulouse-inp.fr>"]
version = "0.1.0"
version = "0.1.1"

[compat]
julia = "1.10"
4 changes: 2 additions & 2 deletions docs/src/tutorial-continuation.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ plt_obj = plot(Tmax_list, obj_list;
xlabel="Maximal thrust (Tmax)",
ylabel="Maximal altitude r(tf)")

plt_sol = plot(sol0; solution_label="(Tmax = "*string(Tmax_list[1])*")")
plot!(plt_sol, sol; solution_label="(Tmax = "*string(Tmax_list[end])*")")
plt_sol = plot(sol0; label="(Tmax = "*string(Tmax_list[1])*")")
plot!(plt_sol, sol; label="(Tmax = "*string(Tmax_list[end])*")")

layout = grid(2, 1, heights=[0.2, 0.8])
plot(plt_obj, plt_sol; layout=layout, size=(800, 1000), leftmargin=5mm)
Expand Down
12 changes: 6 additions & 6 deletions docs/src/tutorial-discretisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ x_style = (legend=:none,)
p_style = (legend=:none,)

sol_trapeze = solve(ocp; tol=1e-8)
plt = plot(sol_trapeze; solution_label="trapeze", state_style=x_style, costate_style=p_style)
plt = plot(sol_trapeze; label="trapeze", state_style=x_style, costate_style=p_style)

sol_midpoint = solve(ocp, disc_method=:midpoint; tol=1e-8)
plot!(plt, sol_midpoint; solution_label="midpoint", state_style=x_style, costate_style=p_style);
plot!(plt, sol_midpoint; label="midpoint", state_style=x_style, costate_style=p_style);

sol_euler = solve(ocp, disc_method=:euler; tol=1e-8)
plot!(plt, sol_euler; solution_label="euler", state_style=x_style, costate_style=p_style);
plot!(plt, sol_euler; label="euler", state_style=x_style, costate_style=p_style);

sol_euler_imp = solve(ocp, disc_method=:euler_implicit; tol=1e-8)
plot!(plt, sol_euler_imp; solution_label="euler implicit", state_style=x_style, costate_style=p_style);
plot!(plt, sol_euler_imp; label="euler implicit", state_style=x_style, costate_style=p_style);

sol_gl2 = solve(ocp, disc_method=:gauss_legendre_2; tol=1e-8)
plot!(plt, sol_gl2; solution_label="gauss legendre 2", state_style=x_style, costate_style=p_style);
plot!(plt, sol_gl2; label="gauss legendre 2", state_style=x_style, costate_style=p_style);

sol_gl3 = solve(ocp, disc_method=:gauss_legendre_3; tol=1e-8)
plot!(plt, sol_gl3; solution_label="gauss legendre 3", state_style=x_style, costate_style=p_style);
plot!(plt, sol_gl3; label="gauss legendre 3", state_style=x_style, costate_style=p_style);

plot(plt, size=(800, 800))
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/tutorial-goddard.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ nothing # hide
and plot the solution

```@example main
plt = plot(direct_sol, solution_label="(direct)", size=(800, 800))
plt = plot(direct_sol, label="direct", size=(800, 800))
```

## [Structure of the solution](@id tutorial-goddard-structure)
Expand Down Expand Up @@ -359,7 +359,7 @@ We plot the solution of the indirect solution (in red) over the solution of the
f = f1 * (t1, fs) * (t2, fb) * (t3, f0) # concatenation of the flows
flow_sol = f((t0, tf), x0, p0) # compute the solution: state, costate, control...

plot!(plt, flow_sol, solution_label="(indirect)")
plot!(plt, flow_sol, label="indirect")
```

## References
Expand Down
Loading