Skip to content

Conversation

@franckgaga
Copy link
Member

@franckgaga franckgaga commented May 22, 2025

In some corner cases (e.g. when nint_u≠0, not sure why I did not see this bug when nint_ym≠0), the caching of the gradient and jacobian MovingHorizonEstimator NLP problem was not working well at the beginning (when the measurement window is not filled, or $N_k \ne H_e$). I added a hack with a clever warm-starting to force the update of the gradient/jacobian when the window is not filled.

Note that it's impossible to shrink the decision variable vector in JuMP.jl, AFAIK. That would be the cleanest solution when the window is not filled (at the beginning). My workaround is to "ignore" some decision variable in in the cost and constraint functions at the beginning (for the NLP case, not QP). That is why this clever hack work.

I will add a test for this bug.

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2025

Codecov Report

Attention: Patch coverage is 97.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.81%. Comparing base (db2827a) to head (f579da4).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/estimator/mhe/execute.jl 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
- Coverage   98.84%   98.81%   -0.03%     
==========================================
  Files          25       25              
  Lines        4225     4234       +9     
==========================================
+ Hits         4176     4184       +8     
- Misses         49       50       +1     

☔ View full report in Codecov by Sentry.
📢 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.

@franckgaga franckgaga merged commit 79b35cb into main May 22, 2025
4 checks passed
@franckgaga franckgaga deleted the debug_mhe branch May 22, 2025 20:20
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.

3 participants