Skip to content

Commit 3f9ddf6

Browse files
committed
revert: keep bang in set_warmstart_mhe!
It modifies `estim.optim`, so let's keep it.
1 parent 1b701fe commit 3f9ddf6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/estimator/mhe/execute.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ function optim_objective!(estim::MovingHorizonEstimator{NT}) where NT<:Real
493493
nŵ, nx̂, Nk = estim.nx̂, estim.nx̂, estim.Nk[]
494494
nx̃ = estim.+ nx̂
495495
Z̃var::Vector{JuMP.VariableRef} = optim[:Z̃var]
496-
Z̃s = set_warmstart_mhe(estim, Z̃var)
496+
Z̃s = set_warmstart_mhe!(estim, Z̃var)
497497
# ------- solve optimization problem --------------
498498
try
499499
JuMP.optimize!(optim)
@@ -540,7 +540,7 @@ function optim_objective!(estim::MovingHorizonEstimator{NT}) where NT<:Real
540540
end
541541

542542
@doc raw"""
543-
set_warmstart_mhe(estim::MovingHorizonEstimator, Z̃var) -> Z̃s
543+
set_warmstart_mhe!(estim::MovingHorizonEstimator, Z̃var) -> Z̃s
544544
545545
Set and return the warm-start value of `Z̃var` for [`MovingHorizonEstimator`](@ref).
546546
@@ -563,7 +563,7 @@ computed at the last time step ``k-1``. If the objective function is not finite
563563
point, all the process noises ``\mathbf{ŵ}_{k-1}(k-j)`` are warm-started at zeros. The
564564
method mutates all the arguments.
565565
"""
566-
function set_warmstart_mhe(estim::MovingHorizonEstimator{NT}, Z̃var) where NT<:Real
566+
function set_warmstart_mhe!(estim::MovingHorizonEstimator{NT}, Z̃var) where NT<:Real
567567
model, buffer = estim.model, estim.buffer
568568
nε, nx̂, nŵ, Nk = estim.nε, estim.nx̂, estim.nx̂, estim.Nk[]
569569
nx̃ =+ nx̂

0 commit comments

Comments
 (0)