Skip to content

doc: argument order bugfix in pH tutorial - #459

Merged
franckgaga merged 1 commit into
mainfrom
debug_offset_dae_mhe
Sep 27, 2026
Merged

franckgaga merged 1 commit into
mainfrom
debug_offset_dae_mhe

Conversation

@franckgaga

@franckgaga franckgaga commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

I reversed the order of the ym and u arguments in updatestate! method for the MHE. There is no longer an unexpected offset between $\mathbf{y}$ and $\mathbf{\hat{y}}$ for $20 \le t \le 30$ h on the pH neutralization tank.

Gotta say, I'm surprised that it was still working with the arguments in the reversed order, but it's only a stroke of luck (or bad luck?) 😆

About this, it's kind of impossible to catch this and throw a clear error message to the user. If it happens that the input and measured output vectors have the same length like here, it's impossible to detect a user mistake like this. That's the major drawback of a "non-symbolic" toolkit like this package.

Here's the preview : https://juliacontrol.github.io/ModelPredictiveControl.jl/previews/PR459

I reversed the order of the `ym` and `u` argument in `updatestate!` method for the MHE.
@franckgaga
franckgaga merged commit bc3be8e into main Sep 27, 2026
17 checks passed
@franckgaga
franckgaga deleted the debug_offset_dae_mhe branch September 27, 2026 16:55
@codecov-commenter

codecov-commenter commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.21%. Comparing base (7fa412c) to head (618e6c8).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
+ Coverage   97.17%   97.21%   +0.04%     
==========================================
  Files          28       28              
  Lines        6867     6867              
==========================================
+ Hits         6673     6676       +3     
+ Misses        194      191       -3     
Flag Coverage Δ
unittests 97.21% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants