Skip to content

Commit f579da4

Browse files
committed
debug: correct index for MHE warm-start vector
1 parent c1ea8bb commit f579da4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/estimator/mhe/execute.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ function set_warmstart_mhe!(V̂, X̂0, estim::MovingHorizonEstimator{NT}, Z̃var
459459
V̂, X̂0 = predict!(V̂, X̂0, û0, k0, ŷ0, estim, model, Z̃s)
460460
Js = obj_nonlinprog!(x̄, estim, model, V̂, Z̃s)
461461
if !isfinite(Js)
462-
Z̃s[nx̃+nx̂+1:end] = 0
462+
Z̃s[nx̃+1:end] = 0
463463
end
464464
# --- unused variable in Z̃ (applied only when Nk ≠ He) ---
465465
# We force the update of the NLP gradient and jacobian by warm-starting the unused

0 commit comments

Comments
 (0)