@@ -600,13 +600,12 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
600
600
end
601
601
return obj_nonlinprog! (Ŷ0, U0, mpc, model, Ue, Ŷe, ΔŨ):: T
602
602
end
603
- function Jfunc! (Z̃, mpc, ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq)
603
+ function Jfunc! (Z̃, ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq)
604
604
update_predictions! (ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq, mpc, Z̃)
605
605
return obj_nonlinprog! (Ŷ0, U0, mpc, model, Ue, Ŷe, ΔŨ)
606
606
end
607
607
Z̃_∇J = fill (myNaN, nZ̃)
608
608
∇J_context = (
609
- Constant (mpc),
610
609
Cache (ΔŨ), Cache (x̂0end), Cache (Ue), Cache (Ŷe), Cache (U0), Cache (Ŷ0),
611
610
Cache (Û0), Cache (X̂0),
612
611
Cache (gc), Cache (g), Cache (geq),
@@ -638,12 +637,11 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
638
637
end
639
638
gfuncs[i] = gfunc_i
640
639
end
641
- function gfunc! (g, Z̃, mpc, ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, geq)
640
+ function gfunc! (g, Z̃, ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, geq)
642
641
return update_predictions! (ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq, mpc, Z̃)
643
642
end
644
643
Z̃_∇g = fill (myNaN, nZ̃)
645
644
∇g_context = (
646
- Constant (mpc),
647
645
Cache (ΔŨ), Cache (x̂0end), Cache (Ue), Cache (Ŷe), Cache (U0), Cache (Ŷ0),
648
646
Cache (Û0), Cache (X̂0),
649
647
Cache (gc), Cache (geq),
@@ -686,12 +684,11 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
686
684
end
687
685
geqfuncs[i] = geqfunc_i
688
686
end
689
- function geqfunc! (geq, Z̃, mpc, ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g)
687
+ function geqfunc! (geq, Z̃, ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g)
690
688
return update_predictions! (ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq, mpc, Z̃)
691
689
end
692
690
Z̃_∇geq = fill (myNaN, nZ̃)
693
691
∇geq_context = (
694
- Constant (mpc),
695
692
Cache (ΔŨ), Cache (x̂0end), Cache (Ue), Cache (Ŷe), Cache (U0), Cache (Ŷ0),
696
693
Cache (Û0), Cache (X̂0),
697
694
Cache (gc), Cache (g)
0 commit comments