Skip to content

Commit 7d03630

Browse files
committed
debug: predict! for NonLinModel and MultipleShooting now works
1 parent 3efa9c4 commit 7d03630

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/controller/transcription.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ function predict!(
687687
nu, ny, nd, nx̂, Hp, Hc = model.nu, model.ny, model.nd, mpc.estim.nx̂, mpc.Hp, mpc.Hc
688688
X̂0 = @views Z̃[(nu*Hc+1):(nu*Hc+nx̂*Hp)] # Z̃ = [ΔU; X̂0; ϵ]
689689
D̂0 = mpc.D̂0
690+
local x̂0
690691
for j=1:Hp
691692
x̂0 = @views X̂0[(1 + nx̂*(j-1)):(nx̂*j)]
692693
d0 = @views D̂0[(1 + nd*(j-1)):(nd*j)]
@@ -697,4 +698,5 @@ function predict!(
697698
x̂0end = x̂0next
698699
x̂0end .= x̂0
699700
return Ŷ0, x̂0end
700-
end
701+
end
702+

0 commit comments

Comments
 (0)