Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ModelPredictiveControl"
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
version = "2.5.1"
version = "2.6.0"
authors = ["Francis Gagnon"]

[deps]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/internals/predictive_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The prediction methodology of this module is mainly based on Maciejowski textboo
ModelPredictiveControl.move_blocking
ModelPredictiveControl.init_ZtoΔU
ModelPredictiveControl.init_ZtoU
ModelPredictiveControl.init_orthocolloc
ModelPredictiveControl.init_predmat
ModelPredictiveControl.init_defectmat
ModelPredictiveControl.relaxU
Expand All @@ -25,7 +26,6 @@ ModelPredictiveControl.relaxterminal
ModelPredictiveControl.augmentdefect
ModelPredictiveControl.init_quadprog
ModelPredictiveControl.init_stochpred
ModelPredictiveControl.init_orthocolloc
ModelPredictiveControl.init_matconstraint_mpc
ModelPredictiveControl.get_nonlinobj_op(::NonLinMPC, ::ModelPredictiveControl.GenericModel)
ModelPredictiveControl.get_nonlincon_oracle(::NonLinMPC, ::ModelPredictiveControl.GenericModel)
Expand Down
6 changes: 4 additions & 2 deletions src/controller/nonlinmpc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ struct NonLinMPC{
model, estim, transcription, Hp, Hc, nb
)
F = zeros(NT, ny*Hp) # dummy value (updated just before optimization)
ES, GS, JS, KS, VS, BS = init_defectmat(model, estim, transcription, Hp, Hc, nb)
Mo, Co, λo = init_orthocolloc(model, transcription)
ES, GS, JS, KS, VS, BS = init_defectmat(
model, estim, transcription, Hp, Hc, nb, Co, λo
)
con, nϵ, P̃Δu, P̃u, Ẽ = init_defaultcon_mpc(
estim, weights, transcription,
Hp, Hc,
Expand All @@ -122,7 +125,6 @@ struct NonLinMPC{
d0, D̂0, D̂e = zeros(NT, nd), zeros(NT, nd*Hp), zeros(NT, nd + nd*Hp)
Uop, Yop, Dop = repeat(model.uop, Hp), repeat(model.yop, Hp), repeat(model.dop, Hp)
test_custom_function_mpc(NT, model, JE, gc!, nc, Uop, Yop, Dop, p)
Mo, Co, λo = init_orthocolloc(model, transcription)
nZ̃ = get_nZ(estim, transcription, Hp, Hc) + nϵ
Z̃ = zeros(NT, nZ̃)
buffer = PredictiveControllerBuffer(estim, transcription, Hp, Hc, nϵ)
Expand Down
Loading
Loading