Skip to content

Commit 364ec93

Browse files
committed
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
1 parent 2730e8b commit 364ec93

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/controller/transcription.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,6 @@ function con_nonlinprog!(
10301030
)
10311031
nŶ = length(Ŷ0)
10321032
for i in eachindex(g)
1033-
mpc.con.i_g[i] || continue
10341033
if i nŶ
10351034
j = i
10361035
g[i] = (mpc.con.Y0min[j] - Ŷ0[j]) - ϵ*mpc.con.C_ymin[j]
@@ -1060,7 +1059,6 @@ function con_nonlinprog!(
10601059
)
10611060
nx̂, nŶ = length(x̂0end), length(Ŷ0)
10621061
for i in eachindex(g)
1063-
mpc.con.i_g[i] || continue
10641062
if i nŶ
10651063
j = i
10661064
g[i] = (mpc.con.Y0min[j] - Ŷ0[j]) - ϵ*mpc.con.C_ymin[j]

src/estimator/mhe/execute.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ function con_nonlinprog_mhe!(g, estim::MovingHorizonEstimator, ::SimModel, X̂0,
703703
nX̂con, nX̂ = length(estim.con.X̂0min), estim.nx̂ *estim.Nk[]
704704
nV̂con, nV̂ = length(estim.con.V̂min), estim.nym*estim.Nk[]
705705
for i in eachindex(g)
706-
estim.con.i_g[i] || continue
707706
if i nX̂con
708707
j = i
709708
jcon = nX̂con-nX̂+j

0 commit comments

Comments
 (0)