813813Set the bound constraint parameters of the [`MovingHorizonEstimator`](@ref) `estim`.
814814
815815It supports both soft and hard constraints on the estimated state ``\mathbf{x̂}``, algebraic
816- variable ``\mathbf{â}`` (for [`NonLinModelDAE](@ref)), process noise ``\mathbf{ŵ}`` and
816+ variable ``\mathbf{â}`` (for [`NonLinModelDAE` ](@ref)), process noise ``\mathbf{ŵ}`` and
817817sensor noise ``\mathbf{v̂}``:
818818```math
819819\begin{alignat*}{3}
@@ -898,7 +898,7 @@ MovingHorizonEstimator estimator with a sample time Ts = 1.0 s:
898898 - `Âmin` / `Âmax` / `C_âmin` / `C_âmax` : ``\mathbf{Â_e}`` constraints `(na*(He+1),)`.
899899 - `Ŵmin` / `Ŵmax` / `C_ŵmin` / `C_ŵmax` : ``\mathbf{Ŵ}`` constraints `(nx̂*He,)`.
900900 - `V̂min` / `V̂max` / `C_v̂min` / `C_v̂max` : ``\mathbf{V̂}`` constraints `(nym*He,)`.
901- The subscript ``\mathbf{e}`` stands for extended with the arrival estimate.
901+ The subscript ``\mathbf{e}`` stands for " extended with the arrival estimate" .
902902"""
903903function setconstraint! (
904904 estim:: MovingHorizonEstimator ;
@@ -974,7 +974,7 @@ function setconstraint!(
974974 con. Âmin .= Âmin
975975 end
976976 if isnothing (Âmax) && ! isnothing (âmax)
977- size (âmax) == (na,) || throw (DimensionMismatch (" âmax size must be $((nxa ,)) " ))
977+ size (âmax) == (na,) || throw (DimensionMismatch (" âmax size must be $((na ,)) " ))
978978 for i in 1 : (na* (He+ 1 ))
979979 con. Âmax[i] = âmax[(i- 1 ) % na + 1 ]
980980 end
@@ -1052,12 +1052,12 @@ function setconstraint!(
10521052 if ! isnothing (C_âmin)
10531053 size (C_âmin) == (nÂe,) || throw (DimensionMismatch (" C_âmin size must be $((nÂe,)) " ))
10541054 any (C_âmin .< 0 ) && error (" C_âmin weights should be non-negative" )
1055- con. A_âmin [:, begin ] .= @. - C_âmin
1055+ con. A_Âmin [:, begin ] .= @. - C_âmin
10561056 end
10571057 if ! isnothing (C_âmax)
10581058 size (C_âmax) == (nÂe,) || throw (DimensionMismatch (" C_âmax size must be $((nÂe,)) " ))
10591059 any (C_âmax .< 0 ) && error (" C_âmax weights should be non-negative" )
1060- con. A_âmax [:, begin ] .= @. - C_âmax
1060+ con. A_Âmax [:, begin ] .= @. - C_âmax
10611061 end
10621062 if ! isnothing (C_ŵmin)
10631063 size (C_ŵmin) == (nŵ* He,) || throw (DimensionMismatch (" C_ŵmin size must be $((nŵ* He,)) " ))
@@ -1212,8 +1212,8 @@ function init_defaultcon_mhe(
12121212 Z̃min, Z̃max = init_boxconstraint_mhe (
12131213 model, transcription, He, nx̂, nŵ, nε,
12141214 x̂0min, x̂0max, X̂0min, X̂0max, Âmin, Âmax, Ŵmin, Ŵmax,
1215- A_x̂min, A_x̂max, A_Âmin, A_Âmax ,
1216- C_x̂min, C_x̂max , A_Ŵmin, A_Ŵmax
1215+ A_x̂min, A_x̂max, C_x̂min, C_x̂max ,
1216+ A_Âmin, A_Âmax , A_Ŵmin, A_Ŵmax
12171217 )
12181218 i_b, i_g, A, Aeq, neq = init_matconstraint_mhe (
12191219 model, transcription, Z̃min, Z̃max, nc, nε,
@@ -1403,7 +1403,7 @@ end
14031403"""
14041404 init_boxconstraint_mhe(
14051405 model::SimModel, transcription::TranscriptionMethod, He, nx̂, nŵ, nε,
1406- x̂0min, x̂0max, X̂0min, X̂0max, Âmin, Âmax, Ŵmin, Ŵmax,
1406+ x̂0min, x̂0max, X̂0min, X̂0max, Âmin, Âmax, Ŵmin, Ŵmax,
14071407 A_x̂min, A_x̂max, C_x̂min, C_x̂max,
14081408 A_Âmin, A_Âmax, A_Ŵmin, A_Ŵmax
14091409 ) -> Z̃min, Z̃max
@@ -1412,7 +1412,7 @@ Init the decision variable box constraints `Z̃min` and `Z̃max` for [`MovingHor
14121412"""
14131413function init_boxconstraint_mhe (
14141414 model:: SimModel{NT} , transcription:: TranscriptionMethod , He, nx̂, nŵ, nε,
1415- x̂0min, x̂0max, X̂0min, X̂0max, Âmin, Âmax, Ŵmin, Ŵmax,
1415+ x̂0min, x̂0max, X̂0min, X̂0max, Âmin, Âmax, Ŵmin, Ŵmax,
14161416 A_x̂min, A_x̂max, C_x̂min, C_x̂max,
14171417 A_Âmin, A_Âmax, A_Ŵmin, A_Ŵmax
14181418) where {NT<: Real }
0 commit comments