Skip to content

Commit 353dda7

Browse files
author
jcaillau
committed
goddard.jl grid-size change
1 parent 4f58b46 commit 353dda7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/goddard.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
using OptimalControl
66
using Plots
7-
unicodeplots()
7+
#unicodeplots()
8+
ENV["GKSwstype"]="nul" # no plot display on stdout
89

910
# Parameters
1011
const Cd = 310
@@ -54,6 +55,7 @@ constraint!(ocp, :dynamics, f)
5455
N = 30
5556
sol = solve(ocp, grid_size=N)
5657
plot(sol)
58+
savefig("sol-direct.pdf")
5759

5860
## Indirect solve
5961

@@ -145,3 +147,4 @@ pr_plot = plot(sol, idxs=(0, 4), xlabel="t", label="p_r")
145147
pv_plot = plot(sol, idxs=(0, 5), xlabel="t", label="p_v")
146148
pm_plot = plot(sol, idxs=(0, 6), xlabel="t", label="p_m")
147149
plot(r_plot, pr_plot, v_plot, pv_plot, m_plot, pm_plot, layout=(3, 2))
150+
savefig("sol-indirect.pdf")

0 commit comments

Comments
 (0)