Skip to content

Commit 3640db7

Browse files
committed
added: save NL equality constraints in mpc.optim
1 parent 4269e90 commit 3640db7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controller/nonlinmpc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ function init_nonlincon!(
667667
Z̃var = optim[:Z̃var]
668668
for i in 1:con.neq
669669
name = Symbol("geq_$i")
670-
geqfunc_i = JuMP.add_nonlinear_operator(optim, nZ̃, geqfuncs[i]; name)
670+
geqfunc_i = optim[name] = JuMP.add_nonlinear_operator(optim, nZ̃, geqfuncs[i]; name)
671671
# set with @constrains here instead of set_nonlincon!, since the number of nonlinear
672672
# equality constraints is known and constant (±Inf are impossible):
673673
@constraint(optim, geqfunc_i(Z̃var...) == 0)

0 commit comments

Comments
 (0)