@@ -176,7 +176,6 @@ struct ControllerConstraint{NT<:Real, GCfunc<:Union{Nothing, Function}}
176176 # indices of finite numbers in the b vector (linear inequality constraints):
177177 i_b :: BitVector
178178 # A matrices for the linear equality constraints:
179- A_Ŝ :: Matrix{NT}
180179 Aeq :: Matrix{NT}
181180 # b vector for the linear equality constraints:
182181 beq :: Vector{NT}
@@ -518,7 +517,7 @@ function setconstraint!(
518517 con. A_Umin, con. A_Umax, con. A_ΔŨmin, con. A_ΔŨmax,
519518 con. A_Ymin, con. A_Ymax, con. A_Wmin, con. A_Wmax,
520519 con. A_x̂min, con. A_x̂max,
521- con. A_Ŝ
520+ con. Aeq
522521 )
523522 A = con. A[con. i_b, :]
524523 b = con. b[con. i_b]
@@ -910,7 +909,7 @@ function init_defaultcon_mpc(
910909 A_Ymin, A_Ymax, Ẽ = relaxŶ (E, C_ymin, C_ymax, nϵ)
911910 A_Wmin, A_Wmax, Ẽw = relaxW (E, Pu, Hp, W̄y, W̄u, C_wmin, C_wmax, nϵ)
912911 A_x̂min, A_x̂max, ẽx̂ = relaxterminal (ex̂, c_x̂min, c_x̂max, nϵ)
913- A_Ŝ , Ẽŝ = augmentdefect (Eŝ, nϵ)
912+ Aeq , Ẽŝ = augmentdefect (Eŝ, nϵ)
914913 i_Umin, i_Umax = .! isinf .(U0min), .! isinf .(U0max)
915914 i_ΔŨmin, i_ΔŨmax = .! isinf .(ΔŨmin), .! isinf .(ΔŨmax)
916915 i_Ymin, i_Ymax = .! isinf .(Y0min), .! isinf .(Y0max)
@@ -920,7 +919,7 @@ function init_defaultcon_mpc(
920919 model, transcription, nc,
921920 i_Umin, i_Umax, i_ΔŨmin, i_ΔŨmax, i_Ymin, i_Ymax, i_Wmin, i_Wmax, i_x̂min, i_x̂max,
922921 A_Umin, A_Umax, A_ΔŨmin, A_ΔŨmax, A_Ymin, A_Ymax, A_Wmin, A_Wmax, A_x̂max, A_x̂min,
923- A_Ŝ
922+ Aeq
924923 )
925924 # dummy fx̂, Fw and Fŝ vectors (updated just before optimization)
926925 fx̂, Fw, Fŝ = zeros (NT, nx̂), zeros (NT, nW), zeros (NT, nx̂* Hp)
@@ -935,7 +934,6 @@ function init_defaultcon_mpc(
935934 A_Umin , A_Umax , A_ΔŨmin , A_ΔŨmax ,
936935 A_Ymin , A_Ymax , A_Wmin , A_Wmax , A_x̂min , A_x̂max ,
937936 A , b , i_b ,
938- A_Ŝ ,
939937 Aeq , beq ,
940938 neq ,
941939 C_ymin , C_ymax , C_wmin , C_wmax , c_x̂min , c_x̂max ,
@@ -1194,14 +1192,14 @@ function relaxterminal(ex̂::AbstractMatrix{NT}, c_x̂min, c_x̂max, nϵ) where
11941192end
11951193
11961194@doc raw """
1197- augmentdefect(Eŝ, nϵ) -> A_Ŝ , Ẽŝ
1195+ augmentdefect(Eŝ, nϵ) -> Aeq , Ẽŝ
11981196
11991197Augment defect equality constraints with slack variable ϵ if `nϵ == 1`.
12001198
1201- It returns the ``\m athbf{Ẽ_ŝ}`` matrix that appears in the defect equation
1202- ``\m athbf{Ŝ = Ẽ_ŝ Z̃ + F_ŝ}`` and the ``\m athbf{A}`` matrix for the equality constraints:
1199+ It returns the ``\m athbf{Ẽ_ŝ}`` matrix that appears in the linear defect equation
1200+ ``\m athbf{Ẽ_ŝ Z̃ + F_ŝ}`` and the ``\m athbf{A}`` matrix for the equality constraints:
12031201```math
1204- \m athbf{A_Ŝ Z̃} = - \m athbf{F_ŝ}
1202+ \m athbf{A_{eq} Z̃} = \m athbf{b_{eq} } = - \m athbf{F_ŝ}
12051203```
12061204"""
12071205function augmentdefect (Eŝ:: AbstractMatrix{NT} , nϵ) where NT<: Real
@@ -1210,8 +1208,8 @@ function augmentdefect(Eŝ::AbstractMatrix{NT}, nϵ) where NT<:Real
12101208 else # Z̃ = Z (only hard constraints)
12111209 Ẽŝ = Eŝ
12121210 end
1213- A_Ŝ = Ẽŝ
1214- return A_Ŝ , Ẽŝ
1211+ Aeq = Ẽŝ
1212+ return Aeq , Ẽŝ
12151213end
12161214
12171215@doc raw """
0 commit comments