Skip to content

Commit 03f3edb

Browse files
committed
views for u in predict! for MPC
1 parent 8f358e0 commit 03f3edb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/predictive_control.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ function predict!(Ŷ, x̂, mpc::PredictiveController, model::SimModel, ΔŨ::V
650650
d0 = @views mpc.d0[1:end]
651651
for j=1:Hp
652652
if j Hc
653-
u0[:] = u0 + ΔŨ[(1 + nu*(j-1)):(nu*j)]
653+
u0[:] = @views u0 + ΔŨ[(1 + nu*(j-1)):(nu*j)]
654654
end
655655
x̂[:] = (mpc.estim, model, x̂, u0, d0)
656656
d0 = @views mpc.D̂0[(1 + nd*(j-1)):(nd*j)]

0 commit comments

Comments
 (0)