Skip to content

added: Jacobian and Hessians in getinfo(mhe) if nc>0#366

Merged
franckgaga merged 9 commits into
mainfrom
getinfo_mhe_linmodel_gc
Jun 3, 2026
Merged

added: Jacobian and Hessians in getinfo(mhe) if nc>0#366
franckgaga merged 9 commits into
mainfrom
getinfo_mhe_linmodel_gc

Conversation

@franckgaga
Copy link
Copy Markdown
Member

@franckgaga franckgaga commented Jun 3, 2026

The info dictionary will now include the Jacobian and Hessians of the nonlinear inequality constraint if the model is a LinModel and the number of custom nonlinear constraints is nc>0

A major cleanup of the getinfo(estim::MovingHorizonEstimator) method was also done. Note that there are two changes in the :X̂ and :D fields:

  1. :X̂ or :Xhat : the number of data points is now $N_k$ instead of $N_k+1$. The $\mathbf{\hat{X}}$ vector is now consistent with the one defined in init_predmath_mhe, so cleaner and easier to maintain. The vector also now exclude the arrival state estimate, but the user can fetch it with info[:x̂arr] or info[:xhatarr].
  2. :D : the number of data points is now $N_k+1$ instead of $N_k$. The $\mathbf{D}$ vector is now consistent with the one defined in init_predmath_mhe, so cleaner and easier to maintain. It also now include the $\mathbf{d}(k-N_k)$ data point, a necessary value to compute the predictions with direct=true.

These 2 changes are theoretically breaking, but I will consider them non-breaking since getinfo is a debugging function.

@franckgaga franckgaga changed the title added: Jacobian and Hessians in getinfo(mhe) if `nc added: Jacobian and Hessians in getinfo(mhe) if nc>0 Jun 3, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.57%. Comparing base (6da3bc5) to head (11c648e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #366   +/-   ##
=======================================
  Coverage   98.56%   98.57%           
=======================================
  Files          27       27           
  Lines        5431     5464   +33     
=======================================
+ Hits         5353     5386   +33     
  Misses         78       78           

☔ 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 05b0a62 into main Jun 3, 2026
5 checks passed
@franckgaga franckgaga deleted the getinfo_mhe_linmodel_gc branch June 3, 2026 20:39
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