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.14.1"
version = "2.14.2"
authors = ["Francis Gagnon"]

[deps]
Expand Down
4 changes: 2 additions & 2 deletions docs/src/manual/nonlinmpc2.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ they are concentrations in mol/L:
```@example 1
nint_ym=0; nint_u=0; # disable the default stochastic model
He = 8; hessian = true
蟽Q = [0.0015, 0.0015, 2e-4]; 蟽R=[0.05]; 蟽P_0 = [0.05, 0.05, 5e-4]
蟽Q = [0.5e-3, 0.5e-3, 0.75e-3]; 蟽R=[0.05]; 蟽P_0 = [0.05, 0.05, 1e-3]
mhe = MovingHorizonEstimator(model; nint_ym, nint_u, He, hessian, 蟽Q, 蟽R, 蟽P_0)
using JuMP; unset_time_limit_sec(mhe.optim) # no wall time limit during optimization
mhe = setconstraint!(mhe, x虃min=[0, 0, 0])
Expand Down Expand Up @@ -335,7 +335,7 @@ function simMHE(mhe, plant, N; x_0, x虃_0)
Y虃_data[:, i] = y虃
X虃_data[:, i] = x虃
x = updatestate!(plant, u, d)
x虃 = updatestate!(mhe, ym, u, dm)
x虃 = updatestate!(mhe, u, ym, dm)
end
plant.p[1] = c_Ain_0
return SimResult(mhe, U_data, Y_data, D_data; plant, X_data, X虃_data, Y虃_data)
Expand Down
Loading