Skip to content

Commit c82e8b2

Browse files
committed
adding plotting recipes
1 parent dc1feb1 commit c82e8b2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/plots/solver_plots.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ end
110110
title --> "Constraint Violation"
111111
linewidth --> [zeros(N_epochs)... 5.0 5.0 5.0 5.0]
112112
label --> [fill("", N_epochs)... "dyn" "con" "sta" "opt" ]
113-
fillrange --> [[fill(y_min*ones(90), N_epochs)... dyn con sta opt ]
113+
fillrange --> [[fill(y_min*ones(iter), N_epochs)... dyn con sta opt ]
114114
[fill(zeros(iter), N_epochs)... zeros(iter) zeros(iter) zeros(iter) zeros(iter) ]]
115115
fillalpha --> [fill(0.1, N_epochs)... 0.0 0.0 0.0 0.0]
116116

src/problem/solver_methods.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function newton_solve!(prob::GameProblem{KN,n,m,T,SVd,SVx}) where {KN,n,m,T,SVd,
2929
Δ = 0.0
3030
for k = 1:opts.outer_iter
3131
out = k
32-
# plot_traj!(model, prob.pdtraj.pr)
32+
# plot!(model, prob.pdtraj.pr)
3333
# Initialize regularization and failed line search count.
3434
set!(opts.reg, opts.reg_0)
3535
LS_count = 0
@@ -67,7 +67,7 @@ end
6767
function inner_iteration(prob::GameProblem, LS_count::Int, t_elap::T, Δ::T, k::Int, l::Int) where {T}
6868
core = prob.core
6969
opts = prob.opts
70-
# plot_traj!(prob.model, prob.pdtraj.pr)
70+
# plot!(prob.model, prob.pdtraj.pr)
7171

7272
# Residual
7373
residual!(prob, prob.pdtraj)
@@ -154,8 +154,8 @@ function ibr_newton_solve!(prob::GameProblem{KN,n,m,T,SVd,SVx};
154154
i = ibr_opts.ordering[id]
155155
ibr_newton_solve!(prob, i)
156156
Δ_change[i] = !(ibr_opts.Δ_min > maximum(prob.stats.Δ_traj))
157-
ibr_opts.live_plotting && Algames.plot_traj!(prob.model, prob.pdtraj.pr)
158-
ibr_opts.live_plotting && Algames.plot_violation!(prob_ibr.stats)
157+
ibr_opts.live_plotting && plot!(prob.model, prob.pdtraj.pr)
158+
ibr_opts.live_plotting && plot!(prob_ibr.stats)
159159
end
160160
residual!(prob, prob.pdtraj)
161161
res = norm(prob.core.res, 1)/length(prob.core.res)
@@ -189,7 +189,7 @@ function ibr_newton_solve!(prob::GameProblem{KN,n,m,T,SVd,SVx}, i::Int) where {K
189189
Δ = 0.0
190190
for k = 1:opts.outer_iter
191191
out = k
192-
# plot_traj!(model, prob.pdtraj.pr)
192+
# plot!(model, prob.pdtraj.pr)
193193
# Initialize regularization and failed line search count.
194194
set!(opts.reg, opts.reg_0)
195195
LS_count = 0
@@ -229,7 +229,7 @@ function ibr_inner_iteration(prob::GameProblem, LS_count::Int, t_elap, Δ::T, k:
229229
opts = prob.opts
230230
verti_mask = vertical_mask(prob.core, i)
231231
horiz_mask = horizontal_mask(prob.core, i)
232-
# plot_traj!(prob.model, prob.pdtraj.pr)
232+
# plot!(prob.model, prob.pdtraj.pr)
233233

234234
# Residual
235235
ibr_residual!(prob, prob.pdtraj, i)

0 commit comments

Comments
 (0)