Skip to content

Commit ca5b230

Browse files
committed
changed: more details in comment
1 parent 9194d4f commit ca5b230

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/LinearMPCext.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ function Base.convert(::Type{LinearMPC.MPC}, mpc::ModelPredictiveControl.LinMPC)
4040
# ---- Constraint softening ---
4141
only_hard = weights.isinf_C
4242
if !only_hard
43-
# LinearMPC relies on a different softening mechanism, so we apply
44-
# an approximate conversion factor on the softening weight Cwt:
43+
# LinearMPC relies on a different softening mechanism (new implicit slack for each
44+
# softened bounds), so we apply an approximate conversion factor on the Cwt weight:
4545
nsoft = sum((mpc.con.A[:,end] .< 0) .& (mpc.con.i_b)) - 1
4646
conversion_factor = 1/2/nsoft
4747
Cwt = weights.Ñ_Hc[end, end]

0 commit comments

Comments
 (0)