From 618e6c8871a6a43368ddeda40a8e2125c2b365e0 Mon Sep 17 00:00:00 2001 From: franckgaga Date: Sun, 27 Sep 2026 12:06:29 -0400 Subject: [PATCH] doc: argument order bugfix in pH tutorial I reversed the order of the `ym` and `u` argument in `updatestate!` method for the MHE. --- Project.toml | 2 +- docs/src/manual/nonlinmpc2.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index b8139c3d0..f93c460cb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ModelPredictiveControl" uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c" -version = "2.14.1" +version = "2.14.2" authors = ["Francis Gagnon"] [deps] diff --git a/docs/src/manual/nonlinmpc2.md b/docs/src/manual/nonlinmpc2.md index 4fe053297..d5036b93b 100644 --- a/docs/src/manual/nonlinmpc2.md +++ b/docs/src/manual/nonlinmpc2.md @@ -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]) @@ -335,7 +335,7 @@ function simMHE(mhe, plant, N; x_0, x̂_0) Ŷ_data[:, i] = ŷ 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, Ŷ_data)