Skip to content

Commit 9ff9fc6

Browse files
committed
Merge branch 'diff_interface_final' into diff_interface_linearize
2 parents f1e04f6 + 990f9c5 commit 9ff9fc6

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/controller/nonlinmpc.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,12 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
600600
end
601601
return obj_nonlinprog!(Ŷ0, U0, mpc, model, Ue, Ŷe, ΔŨ)::T
602602
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)
604604
update_predictions!(ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq, mpc, Z̃)
605605
return obj_nonlinprog!(Ŷ0, U0, mpc, model, Ue, Ŷe, ΔŨ)
606606
end
607607
Z̃_∇J = fill(myNaN, nZ̃)
608608
∇J_context = (
609-
Constant(mpc),
610609
Cache(ΔŨ), Cache(x̂0end), Cache(Ue), Cache(Ŷe), Cache(U0), Cache(Ŷ0),
611610
Cache(Û0), Cache(X̂0),
612611
Cache(gc), Cache(g), Cache(geq),
@@ -638,12 +637,11 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
638637
end
639638
gfuncs[i] = gfunc_i
640639
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)
642641
return update_predictions!(ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq, mpc, Z̃)
643642
end
644643
Z̃_∇g = fill(myNaN, nZ̃)
645644
∇g_context = (
646-
Constant(mpc),
647645
Cache(ΔŨ), Cache(x̂0end), Cache(Ue), Cache(Ŷe), Cache(U0), Cache(Ŷ0),
648646
Cache(Û0), Cache(X̂0),
649647
Cache(gc), Cache(geq),
@@ -686,12 +684,11 @@ function get_optim_functions(mpc::NonLinMPC, ::JuMP.GenericModel{JNT}) where JNT
686684
end
687685
geqfuncs[i] = geqfunc_i
688686
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)
690688
return update_predictions!(ΔŨ, x̂0end, Ue, Ŷe, U0, Ŷ0, Û0, X̂0, gc, g, geq, mpc, Z̃)
691689
end
692690
Z̃_∇geq = fill(myNaN, nZ̃)
693691
∇geq_context = (
694-
Constant(mpc),
695692
Cache(ΔŨ), Cache(x̂0end), Cache(Ue), Cache(Ŷe), Cache(U0), Cache(Ŷ0),
696693
Cache(Û0), Cache(X̂0),
697694
Cache(gc), Cache(g)

src/estimator/mhe/construct.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,13 +1346,12 @@ function get_optim_functions(
13461346
end
13471347
return obj_nonlinprog!(x̄, estim, model, V̂, Z̃)::T
13481348
end
1349-
function Jfunc!(Z̃, estim, V̂, X̂0, û0, ŷ0, g, x̄)
1349+
function Jfunc!(Z̃, V̂, X̂0, û0, ŷ0, g, x̄)
13501350
update_prediction!(V̂, X̂0, û0, ŷ0, g, estim, Z̃)
13511351
return obj_nonlinprog!(x̄, estim, model, V̂, Z̃)
13521352
end
13531353
Z̃_∇J = fill(myNaN, nZ̃)
13541354
∇J_context = (
1355-
Constant(estim),
13561355
Cache(V̂), Cache(X̂0),
13571356
Cache(û0), Cache(ŷ0),
13581357
Cache(g),
@@ -1383,12 +1382,11 @@ function get_optim_functions(
13831382
end
13841383
gfuncs[i] = gfunc_i
13851384
end
1386-
function gfunc!(g, Z̃, estim, V̂, X̂0, û0, ŷ0)
1385+
function gfunc!(g, Z̃, V̂, X̂0, û0, ŷ0)
13871386
return update_prediction!(V̂, X̂0, û0, ŷ0, g, estim, Z̃)
13881387
end
13891388
Z̃_∇g = fill(myNaN, nZ̃)
13901389
∇g_context = (
1391-
Constant(estim),
13921390
Cache(V̂), Cache(X̂0),
13931391
Cache(û0), Cache(ŷ0),
13941392
)

0 commit comments

Comments
 (0)