@@ -77,7 +77,7 @@ struct NonLinMPC{S<:StateEstimator, JEFunc<:Function} <: PredictiveController
7777 last_ΔŨ, last_C, last_Ŷ = nothing , nothing , nothing
7878 function Jfunc (ΔŨ:: Float64... )
7979 if ΔŨ != = last_ΔŨ
80- last_Ŷ = predict (mpc, model, ΔŨ)
80+ last_Ŷ = predict (mpc, model, collect ( ΔŨ) )
8181 last_C = con_nonlinprog (mpc, model, last_Ŷ, ΔŨ)
8282 last_ΔŨ = ΔŨ
8383 end
@@ -86,7 +86,7 @@ struct NonLinMPC{S<:StateEstimator, JEFunc<:Function} <: PredictiveController
8686 last_dΔŨ, last_dC, last_dŶ = nothing , nothing , nothing
8787 function Jfunc (dΔŨ:: T... ) where {T<: Real }
8888 if dΔŨ != = last_dΔŨ
89- last_dŶ = predict (mpc, model, dΔŨ)
89+ last_dŶ = predict (mpc, model, collect ( dΔŨ) )
9090 last_dC = con_nonlinprog (mpc, model, last_dŶ, dΔŨ)
9191 last_dΔŨ = dΔŨ
9292 end
@@ -97,15 +97,15 @@ struct NonLinMPC{S<:StateEstimator, JEFunc<:Function} <: PredictiveController
9797 ncon = length (mpc. con. Ŷmin) + length (mpc. con. Ŷmax)
9898 function con_nonlinprog_i (i, ΔŨ:: NTuple{N, Float64} ) where {N}
9999 if ΔŨ != = last_ΔŨ
100- last_Ŷ = predict (mpc, model, ΔŨ)
100+ last_Ŷ = predict (mpc, model, collect ( ΔŨ) )
101101 last_C = con_nonlinprog (mpc, model, last_Ŷ, ΔŨ)
102102 last_ΔŨ = ΔŨ
103103 end
104104 return last_C[i]
105105 end
106106 function con_nonlinprog_i (i, dΔŨ:: NTuple{N, T} ) where {N, T<: Real }
107107 if dΔŨ != = last_dΔŨ
108- last_dŶ = predict (mpc, model, dΔŨ)
108+ last_dŶ = predict (mpc, model, collect ( dΔŨ) )
109109 last_dC = con_nonlinprog (mpc, model, last_dŶ, dΔŨ)
110110 last_dΔŨ = dΔŨ
111111 end
0 commit comments