Skip to content

Commit f78a98b

Browse files
committed
Debug: replaced !=->!== in Jfunc and gfunc
1 parent 03f3edb commit f78a98b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/controller/nonlinmpc.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function init_optimization!(mpc::NonLinMPC, optim::JuMP.GenericModel{JNT}) where
291291
function Jfunc(ΔŨtup::JNT...)
292292
= get_tmp(Ŷ_cache, ΔŨtup[1])
293293
ΔŨ = collect(ΔŨtup)
294-
if ΔŨtup != last_ΔŨtup_float
294+
if ΔŨtup !== last_ΔŨtup_float
295295
= get_tmp(x̂_cache, ΔŨtup[1])
296296
g = get_tmp(g_cache, ΔŨtup[1])
297297
Ŷ, x̂end = predict!(Ŷ, x̂, mpc, model, ΔŨ)
@@ -303,7 +303,7 @@ function init_optimization!(mpc::NonLinMPC, optim::JuMP.GenericModel{JNT}) where
303303
function Jfunc(ΔŨtup::ForwardDiff.Dual...)
304304
= get_tmp(Ŷ_cache, ΔŨtup[1])
305305
ΔŨ = collect(ΔŨtup)
306-
if ΔŨtup != last_ΔŨtup_dual
306+
if ΔŨtup !== last_ΔŨtup_dual
307307
= get_tmp(x̂_cache, ΔŨtup[1])
308308
g = get_tmp(g_cache, ΔŨtup[1])
309309
Ŷ, x̂end = predict!(Ŷ, x̂, mpc, model, ΔŨ)
@@ -314,7 +314,7 @@ function init_optimization!(mpc::NonLinMPC, optim::JuMP.GenericModel{JNT}) where
314314
end
315315
function gfunc_i(i, ΔŨtup::NTuple{N, JNT}) where N
316316
g = get_tmp(g_cache, ΔŨtup[1])
317-
if ΔŨtup != last_ΔŨtup_float
317+
if ΔŨtup !== last_ΔŨtup_float
318318
= get_tmp(x̂_cache, ΔŨtup[1])
319319
= get_tmp(Ŷ_cache, ΔŨtup[1])
320320
ΔŨ = collect(ΔŨtup)
@@ -326,7 +326,7 @@ function init_optimization!(mpc::NonLinMPC, optim::JuMP.GenericModel{JNT}) where
326326
end
327327
function gfunc_i(i, ΔŨtup::NTuple{N, ForwardDiff.Dual}) where N
328328
g = get_tmp(g_cache, ΔŨtup[1])
329-
if ΔŨtup != last_ΔŨtup_dual
329+
if ΔŨtup !== last_ΔŨtup_dual
330330
= get_tmp(x̂_cache, ΔŨtup[1])
331331
= get_tmp(Ŷ_cache, ΔŨtup[1])
332332
ΔŨ = collect(ΔŨtup)

0 commit comments

Comments
 (0)