Skip to content

added: custom nonlinear inequality constraints for MovingHorizonEstimator 🥳#360

Open
franckgaga wants to merge 53 commits into
mainfrom
mhe_custom_con
Open

added: custom nonlinear inequality constraints for MovingHorizonEstimator 🥳#360
franckgaga wants to merge 53 commits into
mainfrom
mhe_custom_con

Conversation

@franckgaga
Copy link
Copy Markdown
Member

@franckgaga franckgaga commented May 22, 2026

The custom constraint function will receive all the data windows, the arrival estimation error and covariance, a parameter argument and the slack variable. The data windows will grows with time until $N_k = H_e$ is reached. Similarly to NonLinMPC, the custom function is called in the constructor to troubleshoot simple issues in it. The function is called $H_e$ times to test the growing windows, since it is expected that the user will easily forget this aspect of the MHE.

As discussed in #350, the data windows in the MovingHorizonEstimator are inherently "misaligned". I introduced extended vectors to artificially align them, but the windows will include NaN values as a side-effects. The windows are clearly (hopefully!) documented in the docstring:

image image

Closes #350

franckgaga added 30 commits May 13, 2026 10:57
This is needed for the custom NL constraints.
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.

Support custom constraints for MovingHorizonEstimator

1 participant