@@ -491,14 +491,14 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
491491 for i in eachindex (ΔŨtup)
492492 ΔŨ[i] = ΔŨtup[i] # ΔŨ .= ΔŨtup seems to produce a type instability
493493 end
494- Ŷe, Ue = get_tmp (Ŷe_cache, ΔŨ1), get_tmp (Ue_cache, ΔŨ1)
495- Ȳ, Ū = get_tmp (Ȳ_cache, ΔŨ1), get_tmp (Ū_cache, ΔŨ1)
494+ Ŷe, Ue = get_tmp (Ŷe_cache, ΔŨ1), get_tmp (Ue_cache, ΔŨ1)
495+ Ȳ, Ū = get_tmp (Ȳ_cache, ΔŨ1), get_tmp (Ū_cache, ΔŨ1)
496496 x̂0, x̂0next = get_tmp (x̂0_cache, ΔŨ1), get_tmp (x̂0next_cache, ΔŨ1)
497497 u0, û0 = get_tmp (u0_cache, ΔŨ1), get_tmp (û0_cache, ΔŨ1)
498- Ŷ0, x̂0end = predict! (Ȳ, x̂0, x̂0next, u0, û0, mpc, model, ΔŨ )
499- Ŷe, Ue = extended_predictions! (Ŷe, Ue, Ū, mpc, model, Ŷ0 , ΔŨ)
500- g = get_tmp (g_cache, ΔŨ1 )
501- g = con_nonlinprog! (g, mpc, model, x̂0end, Ŷ0, ΔŨ)
498+ g = get_tmp (g_cache, ΔŨ1 )
499+ Ŷ0, x̂0end = predict! (Ȳ, x̂0, x̂0next, u0, û0, mpc, model , ΔŨ)
500+ Ŷe, Ue = extended_predictions! (Ŷe, Ue, Ū, mpc, model, Ŷ0, ΔŨ )
501+ g = con_nonlinprog! (g, mpc, model, x̂0end, Ŷ0, ΔŨ)
502502 return obj_nonlinprog! (Ȳ, Ū, mpc, model, Ŷe, Ue, ΔŨ):: T
503503 end
504504 function gfunc_i (i, ΔŨtup:: NTuple{N, T} ) where {N, T<: Real }
@@ -508,14 +508,14 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
508508 for i in eachindex (ΔŨtup)
509509 ΔŨ[i] = ΔŨtup[i] # ΔŨ .= ΔŨtup seems to produce a type instability
510510 end
511- Ŷe, Ue = get_tmp (Ŷe_cache, ΔŨ1), get_tmp (Ue_cache, ΔŨ1)
512- Ȳ, Ū = get_tmp (Ȳ_cache, ΔŨ1), get_tmp (Ū_cache, ΔŨ1)
511+ Ŷe, Ue = get_tmp (Ŷe_cache, ΔŨ1), get_tmp (Ue_cache, ΔŨ1)
512+ Ȳ, Ū = get_tmp (Ȳ_cache, ΔŨ1), get_tmp (Ū_cache, ΔŨ1)
513513 x̂0, x̂0next = get_tmp (x̂0_cache, ΔŨ1), get_tmp (x̂0next_cache, ΔŨ1)
514514 u0, û0 = get_tmp (u0_cache, ΔŨ1), get_tmp (û0_cache, ΔŨ1)
515- Ŷ0, x̂0end = predict! (Ȳ, x̂0, x̂0next, u0, û0, mpc, model, ΔŨ )
516- Ŷe, Ue = extended_predictions! (Ŷe, Ue, Ū, mpc, model, Ŷ0 , ΔŨ)
517- g = get_tmp (g_cache, ΔŨ1 )
518- g = con_nonlinprog! (g, mpc, model, x̂0end, Ŷ0, ΔŨ)
515+ g = get_tmp (g_cache, ΔŨ1 )
516+ Ŷ0, x̂0end = predict! (Ȳ, x̂0, x̂0next, u0, û0, mpc, model , ΔŨ)
517+ Ŷe, Ue = extended_predictions! (Ŷe, Ue, Ū, mpc, model, Ŷ0, ΔŨ )
518+ g = con_nonlinprog! (g, mpc, model, x̂0end, Ŷ0, ΔŨ)
519519 end
520520 return g[i]:: T
521521 end
0 commit comments