Skip to content

Conversation

@franckgaga
Copy link
Member

@franckgaga franckgaga commented Oct 22, 2025

This PR follows discussions at #269.

This boolean keyword argument maintain compatibility with custom NL solvers that do not surport the VectorNonlinearOracle set for now. The default is:

oracle = (JuMP.solver_name(optim) == "Ipopt")

That is, it will use the new efficient oracle set only with Ipopt by default.

The old splatting syntax for the nonlinear constraints is considered now legacy, and the related code is moved in src/estimator/mhe/legacy.jl and src/controller/legacy.jl, to ease the removal when the timing will be good.

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 92.97753% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.02%. Comparing base (ec90212) to head (c8f2f93).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/controller/legacy.jl 88.73% 24 Missing ⚠️
src/estimator/mhe/legacy.jl 99.09% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #270      +/-   ##
==========================================
- Coverage   98.44%   98.02%   -0.43%     
==========================================
  Files          26       28       +2     
  Lines        4314     4657     +343     
==========================================
+ Hits         4247     4565     +318     
- Misses         67       92      +25     

☔ 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
Copy link
Member Author

franckgaga commented Oct 22, 2025

I ran the benchmarks locally, comparing this commit to v1.11. The relevant results are:

v1.11.1 dirty v1.11.1 / dirty
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting 1.07 ± 0.022 s 0.358 ± 0.026 s 2.98 ± 0.22
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/SingleShooting 0.978 ± 0.01 s 0.777 ± 0.02 s 1.26 ± 0.035
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation 1.06 ± 0.021 s 0.359 ± 0.029 s 2.96 ± 0.25
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting 0.523 ± 0.0088 s 0.185 ± 0.0061 s 2.83 ± 0.1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting 0.249 ± 0.016 s 0.248 ± 0.019 s 1 ± 0.1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation 0.493 ± 0.019 s 0.173 ± 0.0065 s 2.85 ± 0.15
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting 0.0665 ± 0.0028 s 0.0671 ± 0.0045 s 0.991 ± 0.078
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting 0.516 ± 0.0089 s 0.172 ± 0.0049 s 2.99 ± 0.1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.539 ± 0.0093 s 0.186 ± 0.021 s 2.89 ± 0.33
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting 0.256 ± 0.014 s 0.253 ± 0.018 s 1.01 ± 0.09
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation 0.454 ± 0.004 s 0.172 ± 0.0048 s 2.64 ± 0.078
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.467 ± 0.0094 s 0.186 ± 0.019 s 2.51 ± 0.26
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting 0.0664 ± 0.0031 s 0.0629 ± 0.0041 s 1.05 ± 0.085
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form 3.3 ± 0.032 s 2.35 ± 0.013 s 1.4 ± 0.015
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form 1.89 ± 0.013 s 1.41 ± 0.018 s 1.34 ± 0.019
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Current form 1.57 ± 0.042 s 1.51 ± 0.035 s 1.04 ± 0.037
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Prediction form 0.975 ± 0.011 s 0.901 ± 0.012 s 1.08 ± 0.019
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShooting 5.47 ± 0.24 ms 1.62 ± 0.06 ms 3.39 ± 0.19
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShooting 0.908 ± 0.05 ms 0.891 ± 0.029 ms 1.02 ± 0.065
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/TrapezoidalCollocation 1.82 ± 0.052 ms 1.14 ± 0.069 ms 1.59 ± 0.11
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Current form 0.162 ± 0.0081 ms 0.163 ± 0.0073 ms 0.994 ± 0.067
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Prediction form 0.17 ± 0.0078 ms 0.163 ± 0.0075 ms 1.05 ± 0.068
time_to_load 2.24 ± 0.0042 s 2.06 ± 0.013 s 1.09 ± 0.007

@franckgaga franckgaga merged commit 92eec87 into main Oct 23, 2025
4 of 5 checks passed
@franckgaga franckgaga deleted the option_oracle branch October 23, 2025 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants