From 364ec93b20f874b725796ba5e09d77a365587c76 Mon Sep 17 00:00:00 2001 From: franckgaga Date: Tue, 2 Dec 2025 17:59:34 -0500 Subject: [PATCH] changed: fill inequality vector `g` even if `Inf` bounds It probably does not save much computation and this is a source of bug (since i'm filling `g` in-place) Let's benchmark this change in a separate PR --- src/controller/transcription.jl | 2 -- src/estimator/mhe/execute.jl | 1 - 2 files changed, 3 deletions(-) diff --git a/src/controller/transcription.jl b/src/controller/transcription.jl index 8593c61a0..1d7007a43 100644 --- a/src/controller/transcription.jl +++ b/src/controller/transcription.jl @@ -1030,7 +1030,6 @@ function con_nonlinprog!( ) nŶ = length(Ŷ0) for i in eachindex(g) - mpc.con.i_g[i] || continue if i ≤ nŶ j = i g[i] = (mpc.con.Y0min[j] - Ŷ0[j]) - ϵ*mpc.con.C_ymin[j] @@ -1060,7 +1059,6 @@ function con_nonlinprog!( ) nx̂, nŶ = length(x̂0end), length(Ŷ0) for i in eachindex(g) - mpc.con.i_g[i] || continue if i ≤ nŶ j = i g[i] = (mpc.con.Y0min[j] - Ŷ0[j]) - ϵ*mpc.con.C_ymin[j] diff --git a/src/estimator/mhe/execute.jl b/src/estimator/mhe/execute.jl index 73a9d05ea..5dace6776 100644 --- a/src/estimator/mhe/execute.jl +++ b/src/estimator/mhe/execute.jl @@ -703,7 +703,6 @@ function con_nonlinprog_mhe!(g, estim::MovingHorizonEstimator, ::SimModel, X̂0, nX̂con, nX̂ = length(estim.con.X̂0min), estim.nx̂ *estim.Nk[] nV̂con, nV̂ = length(estim.con.V̂min), estim.nym*estim.Nk[] for i in eachindex(g) - estim.con.i_g[i] || continue if i ≤ nX̂con j = i jcon = nX̂con-nX̂+j