Skip to content

Commit 85c8f6f

Browse files
committed
changed: updating fx̂ is not necessary for non-SingleShooting
It is always equal to zero
1 parent 87a5eb1 commit 85c8f6f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/controller/transcription.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -881,13 +881,7 @@ end
881881
function linconstraint!(mpc::PredictiveController, model::NonLinModel, ::TranscriptionMethod)
882882
nU, nΔŨ, nY = length(mpc.con.U0min), length(mpc.con.ΔŨmin), length(mpc.con.Y0min)
883883
nx̂, fx̂ = mpc.estim.nx̂, mpc.con.fx̂
884-
fx̂ .= mpc.con.bx̂
885-
mul!(fx̂, mpc.con.kx̂, mpc.estim.x̂0, 1, 1)
886-
mul!(fx̂, mpc.con.vx̂, mpc.estim.lastu0, 1, 1)
887-
if model.nd 0
888-
mul!(fx̂, mpc.con.gx̂, mpc.d0, 1, 1)
889-
mul!(fx̂, mpc.con.jx̂, mpc.D̂0, 1, 1)
890-
end
884+
# here, updating fx̂ is not necessary since fx̂ = 0
891885
n = 0
892886
mpc.con.b[(n+1):(n+nU)] .= @. -mpc.con.U0min + mpc.Tu_lastu0
893887
n += nU

0 commit comments

Comments
 (0)