Skip to content

Commit 92eec87

Browse files
authored
Merge pull request #270 from JuliaControl/option_oracle
added: `oracle` option in `NonLinMPC` and `MovingHorizonEstimator`
2 parents ec90212 + c8f2f93 commit 92eec87

File tree

10 files changed

+802
-25
lines changed

10 files changed

+802
-25
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ModelPredictiveControl"
22
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
3-
version = "1.11.1"
3+
version = "1.12.0"
44
authors = ["Francis Gagnon"]
55

66
[deps]

src/controller/construct.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ function setconstraint!(
439439
JuMP.delete(optim, optim[:linconstraint])
440440
JuMP.unregister(optim, :linconstraint)
441441
@constraint(optim, linconstraint, A*Z̃var .≤ b)
442-
g_oracle, geq_oracle = get_nonlinops(mpc, optim)
443-
set_nonlincon!(mpc, optim, g_oracle, geq_oracle)
442+
reset_nonlincon!(mpc)
444443
else
445444
i_b, i_g = init_matconstraint_mpc(
446445
model, transcription, nc,
@@ -454,11 +453,8 @@ function setconstraint!(
454453
return mpc
455454
end
456455

457-
"By default, no nonlinear operators, return 3 nothing"
458-
get_nonlinops(::PredictiveController, _ ) = (nothing, nothing, nothing)
459-
460456
"By default, no nonlinear constraints, return nothing."
461-
set_nonlincon!(::PredictiveController, _ , _ , _ ) = nothing
457+
reset_nonlincon!(::PredictiveController) = nothing
462458

463459
"""
464460
default_Hp(model::LinModel)

0 commit comments

Comments
 (0)