Skip to content

Commit 45ca458

Browse files
committed
changed: minor change in error messages
1 parent 5eb8642 commit 45ca458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/LinearMPCext.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ function validate_constraints(mpc::ModelPredictiveControl.LinMPC)
148148
C_x̂min, C_x̂max = -mpc.con.A_x̂min[:, end], -mpc.con.A_x̂max[:, end]
149149
is0or1(C) = all(x -> x 0 || x 1, C)
150150
if !is0or1(C_umin) || !is0or1(C_umax) || !is0or1(C_ymin) || !is0or1(C_ymax)
151-
error("LinearMPC does not support softness parameters c 0 or 1.")
151+
error("LinearMPC only supports softness parameters c = 0 or 1.")
152152
end
153153
if !isapprox(C_umin, C_umax) || !isapprox(C_ymin, C_ymax) || !isapprox(C_x̂min, C_x̂max)
154-
error("LinearMPC does not support different softness parameters for lower and upper bounds.")
154+
error("LinearMPC only supports identical softness parameters for lower and upper bounds.")
155155
end
156156
nΔU = mpc.Hc * mpc.estim.model.nu
157157
if any(isfinite, ΔŨmin[1:nΔU]) || any(isfinite, ΔŨmax[1:nΔU])

0 commit comments

Comments
 (0)