Skip to content

Commit de99b51

Browse files
committed
debug: correct operating pt handling in predict! for NonLinModel
1 parent 59dbc3d commit de99b51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/controller/execute.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ function predict!(Ŷ0, x̂0, x̂0next, u0, û0, mpc::PredictiveController, mod
336336
u0 .+= @views ΔŨ[(1 + nu*(j-1)):(nu*j)]
337337
end
338338
f̂!(x̂0next, û0, mpc.estim, model, x̂0, u0, d0)
339-
x̂0next .+= mpc.estim.f̂op .+ mpc.estim.x̂op
339+
x̂0next .+= mpc.estim.f̂op .- mpc.estim.x̂op
340340
x̂0 .= x̂0next
341341
d0 = @views mpc.D̂0[(1 + nd*(j-1)):(nd*j)]
342342
ŷ0 = @views Ŷ0[(1 + ny*(j-1)):(ny*j)]
@@ -589,5 +589,5 @@ function setmodel_controller!(mpc::PredictiveController, model::LinModel, x̂op_
589589
return nothing
590590
end
591591

592-
"No need to modify the Hessian by default (only needed for quadratic optimization)."
592+
"No need to set the objective Hessian by default (only needed for quadratic optimization)."
593593
set_objective_hessian!(::PredictiveController, _ ) = nothing

0 commit comments

Comments
 (0)