Skip to content

added: custom linear inequality constraints for LinMPC and NonLinMPC#310

Merged
franckgaga merged 44 commits intomainfrom
custom_linconstraint
Feb 6, 2026
Merged

added: custom linear inequality constraints for LinMPC and NonLinMPC#310
franckgaga merged 44 commits intomainfrom
custom_linconstraint

Conversation

@franckgaga
Copy link
Member

@franckgaga franckgaga commented Feb 4, 2026

This PR introduces custom nonlinear inequality constraints for LinMPC and NonLinMPC objects. The constructor of both objects now accepts 4 new keyword arguments:

  • Wy=nothing : custom linear constraint matrix for output.
  • Wu=nothing : custom linear constraint matrix for manipulated input.
  • Wd=nothing : custom linear constraint matrix for meas. disturbance.
  • Wr=nothing : custom linear constraint matrix for output setpoint.

and the setconstraint! method now accept these keyword arguments:

  • wmin=fill(-Inf,nw) / wmax=fill(+Inf,nw) : custom linear constraint bound $\mathbf{w_{min/max}}$
  • c_wmin=fill(1.0,nw) / c_wmax=fill(1.0,nw) : wmin / wmax softness weight $\mathbf{c_{w_{min/max}}}$
  • the keyword arguments above but with a first capital letter, e.g. Wmax or C_wmin: for time-varying constraints

The custom nonlinear inequality constraints are defined as a linear combination of the output prediction $\mathbf{\hat{y}}$, manipulated input $\mathbf{u}$, measured disturbance prediction $\mathbf{\hat{d}}$ and setpoint prediction $\mathbf{\hat{r}_y}$, as described in the extended help section of setconstraint! :

image

I chose to incorporate the output prediction $\mathbf{\hat{y}}$ instead of state prediction $\mathbf{\hat{x}}$ in them mainly because its associated prediction matrices are already constructed and available inside LinMPC and NonLinMPC objects. This is non-limiting in practice since you can always output the states that are needed by modifying the state-space $\mathbf{C}$ and $\mathbf{D_d}$ matrices, and adjusting the i_ym argument of the state estimator if these states are not measured.

Note that C code generation is not supported for now but I will add the support in the following PR.

This is the letter that has the lowest amount of confusion. It is used in the MHE/KF but only with a hat.
It is not supported for now, I will add the support in a following PR.
The error message is clearer if the tests do not pass.
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 99.60159% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.35%. Comparing base (1d87477) to head (b4ba499).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/controller/construct.jl 99.22% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #310      +/-   ##
==========================================
+ Coverage   98.33%   98.35%   +0.02%     
==========================================
  Files          29       29              
  Lines        5155     5296     +141     
==========================================
+ Hits         5069     5209     +140     
- Misses         86       87       +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.

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Benchmark Results (Julia v1)

Time benchmarks
main b4ba499... main / b4ba499...
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/DAQP/SingleShooting 5.77 ± 0.39 ms 5.26 ± 0.4 ms 1.1 ± 0.11
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/MultipleShooting 0.321 ± 0.0042 s 0.313 ± 0.009 s 1.02 ± 0.032
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/SingleShooting 0.231 ± 0.0061 s 0.221 ± 0.015 s 1.05 ± 0.076
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/MultipleShooting 8.99 ± 0.49 ms 9.14 ± 0.5 ms 0.984 ± 0.076
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/SingleShooting 1.76 ± 0.039 ms 1.76 ± 0.026 ms 1 ± 0.027
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/DAQP/SingleShooting 5.75 ± 0.41 ms 5.25 ± 0.4 ms 1.1 ± 0.11
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/MultipleShooting 0.279 ± 0.0048 s 0.277 ± 0.0044 s 1.01 ± 0.023
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/SingleShooting 0.234 ± 0.003 s 0.241 ± 0.0015 s 0.973 ± 0.014
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/MultipleShooting 6.27 ± 0.38 ms 6.31 ± 0.37 ms 0.994 ± 0.083
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/SingleShooting 1.85 ± 0.044 ms 1.85 ± 0.042 ms 0.996 ± 0.033
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/DAQP/SingleShooting 10.1 ± 1.4 ms 9.9 ± 1.5 ms 1.02 ± 0.21
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/MultipleShooting 0.316 ± 0.078 s 0.311 ± 0.072 s 1.02 ± 0.35
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/SingleShooting 0.16 ± 0.0015 s 0.158 ± 0.0023 s 1.01 ± 0.017
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/MultipleShooting 0.106 ± 0.023 s 0.1 ± 0.021 s 1.05 ± 0.32
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/SingleShooting 13.2 ± 1.4 ms 13 ± 1.3 ms 1.02 ± 0.15
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting 0.696 ± 0.025 s 0.688 ± 0.026 s 1.01 ± 0.053
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting (Hessian) 0.69 ± 0.054 s 0.659 ± 0.045 s 1.05 ± 0.11
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/SingleShooting 1.72 ± 0.05 s 1.7 ± 0.056 s 1.02 ± 0.045
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation 0.508 ± 0.066 s 0.502 ± 0.058 s 1.01 ± 0.18
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation (Hessian) 0.508 ± 0.066 s 0.49 ± 0.055 s 1.04 ± 0.18
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting 0.357 ± 0.0066 s 0.352 ± 0.0042 s 1.02 ± 0.022
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting (Hessian) 0.452 ± 0.053 s 0.441 ± 0.044 s 1.03 ± 0.16
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting 0.489 ± 0.0096 s 0.486 ± 0.0056 s 1.01 ± 0.023
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting (Hessian) 0.168 ± 0.006 s 0.165 ± 0.0032 s 1.02 ± 0.042
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation 0.334 ± 0.0066 s 0.327 ± 0.006 s 1.02 ± 0.028
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation (Hessian) 0.403 ± 0.054 s 0.393 ± 0.046 s 1.03 ± 0.18
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting 0.15 ± 0.015 s 0.152 ± 0.016 s 0.985 ± 0.14
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting 0.345 ± 0.0021 s 0.341 ± 0.002 s 1.01 ± 0.0086
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (Hessian) 0.409 ± 0.041 s 0.404 ± 0.04 s 1.01 ± 0.14
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.367 ± 0.013 s 0.362 ± 0.011 s 1.02 ± 0.049
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting 0.495 ± 0.011 s 0.484 ± 0.0095 s 1.02 ± 0.031
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting (Hessian) 0.169 ± 0.0045 s 0.166 ± 0.002 s 1.02 ± 0.029
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation 0.324 ± 0.007 s 0.319 ± 0.0058 s 1.02 ± 0.029
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (Hessian) 0.308 ± 0.021 s 0.299 ± 0.031 s 1.03 ± 0.13
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.362 ± 0.013 s 0.358 ± 0.01 s 1.01 ± 0.046
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting 0.13 ± 0.013 s 0.132 ± 0.012 s 0.99 ± 0.13
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Current form 0.0431 ± 0.0018 s 0.0386 ± 0.001 s 1.12 ± 0.055
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Prediction form 0.0364 ± 0.011 s 0.0325 ± 0.0081 s 1.12 ± 0.45
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Current form 0.177 ± 0.044 s 0.17 ± 0.04 s 1.04 ± 0.36
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Prediction form 0.161 ± 0.023 s 0.163 ± 0.026 s 0.989 ± 0.21
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Current form 0.0372 ± 0.0053 s 0.0339 ± 0.0026 s 1.1 ± 0.18
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Prediction form 29.4 ± 7.6 ms 28.5 ± 7.3 ms 1.03 ± 0.38
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form 0.0891 ± 0.0029 s 0.0853 ± 0.0019 s 1.04 ± 0.041
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian) 0.0906 ± 0.0056 s 0.0808 ± 0.002 s 1.12 ± 0.075
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form 0.0743 ± 0.0037 s 0.0685 ± 0.0027 s 1.08 ± 0.068
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian) 0.0991 ± 0.0033 s 0.0907 ± 0.0044 s 1.09 ± 0.064
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Current form 2.56 ± 0.055 s 2.52 ± 0.027 s 1.02 ± 0.024
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Prediction form 1.53 ± 0.011 s 1.44 ± 0.016 s 1.06 ± 0.014
UNIT TESTS/PredictiveController/ExplicitMPC/moveinput! 4.21 ± 0.03 μs 4.14 ± 0.15 μs 1.02 ± 0.037
UNIT TESTS/PredictiveController/LinMPC/getinfo! 0.108 ± 0.0023 ms 0.108 ± 0.0023 ms 1 ± 0.03
UNIT TESTS/PredictiveController/LinMPC/moveinput!/MultipleShooting 0.106 ± 0.0015 ms 0.106 ± 0.0013 ms 0.999 ± 0.019
UNIT TESTS/PredictiveController/LinMPC/moveinput!/SingleShooting 15.2 ± 0.34 μs 15.8 ± 0.31 μs 0.963 ± 0.029
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/LinModel 0.199 ± 0.01 ms 0.2 ± 0.011 ms 0.998 ± 0.074
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/NonLinModel 0.242 ± 0.014 ms 0.241 ± 0.016 ms 1.01 ± 0.088
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/MultipleShooting 2.55 ± 0.21 ms 2.55 ± 0.2 ms 0.999 ± 0.11
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/SingleShooting 1.76 ± 0.084 ms 1.75 ± 0.098 ms 1.01 ± 0.074
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShooting 3.06 ± 0.11 ms 3.14 ± 0.13 ms 0.975 ± 0.055
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShootingHessian 3.25 ± 0.13 ms 3.31 ± 0.13 ms 0.984 ± 0.055
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShooting 1.74 ± 0.058 ms 1.73 ± 0.054 ms 1 ± 0.046
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShootingHessian 1.73 ± 0.039 ms 1.73 ± 0.042 ms 0.999 ± 0.033
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/TrapezoidalCollocation 2.24 ± 0.12 ms 2.23 ± 0.13 ms 1.01 ± 0.078
UNIT TESTS/SimModel/LinModel/evaloutput 0.16 ± 0.01 μs 0.15 ± 0.001 μs 1.07 ± 0.067
UNIT TESTS/SimModel/LinModel/updatestate! 0.22 ± 0.019 μs 0.211 ± 0.01 μs 1.04 ± 0.1
UNIT TESTS/SimModel/NonLinModel/evaloutput 0.431 ± 0.001 μs 0.44 ± 0.01 μs 0.98 ± 0.022
UNIT TESTS/SimModel/NonLinModel/linearize! 2.06 ± 0.03 μs 2.02 ± 0.03 μs 1.02 ± 0.021
UNIT TESTS/SimModel/NonLinModel/updatestate! 0.5 ± 0.01 μs 0.501 ± 0.01 μs 0.998 ± 0.028
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/LinModel 0.561 ± 0.01 μs 0.551 ± 0.001 μs 1.02 ± 0.018
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/NonLinModel 1.8 ± 0.011 μs 1.79 ± 0.019 μs 1.01 ± 0.012
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/LinModel 0.27 ± 0.01 μs 0.28 ± 0.01 μs 0.964 ± 0.05
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/NonLinModel 1.41 ± 0.001 μs 1.42 ± 0.01 μs 0.993 ± 0.007
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/LinModel 3.97 ± 0.05 μs 4.05 ± 0.081 μs 0.98 ± 0.023
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/NonLinModel 8.97 ± 0.12 μs 8.77 ± 0.091 μs 1.02 ± 0.017
UNIT TESTS/StateEstimator/InternalModel/evaloutput/LinModel 0.241 ± 0.001 μs 0.24 ± 0.001 μs 1 ± 0.0059
UNIT TESTS/StateEstimator/InternalModel/evaloutput/NonLinModel 0.581 ± 0.01 μs 0.581 ± 0.01 μs 1 ± 0.024
UNIT TESTS/StateEstimator/InternalModel/preparestate!/LinModel 0.29 ± 0.001 μs 0.291 ± 0.011 μs 0.997 ± 0.038
UNIT TESTS/StateEstimator/InternalModel/preparestate!/NonLinModel 0.751 ± 0.01 μs 0.742 ± 0.01 μs 1.01 ± 0.019
UNIT TESTS/StateEstimator/InternalModel/updatestate!/LinModel 0.411 ± 0 μs 0.411 ± 0.01 μs 1 ± 0.024
UNIT TESTS/StateEstimator/InternalModel/updatestate!/NonLinModel 0.922 ± 0.001 μs 0.922 ± 0.01 μs 1 ± 0.011
UNIT TESTS/StateEstimator/KalmanFilter/evaloutput 0.281 ± 0.001 μs 0.271 ± 0.001 μs 1.04 ± 0.0053
UNIT TESTS/StateEstimator/KalmanFilter/preparestate! 0.131 ± 0.01 μs 0.13 ± 0.001 μs 1.01 ± 0.077
UNIT TESTS/StateEstimator/KalmanFilter/updatestate! 2.54 ± 0.04 μs 2.52 ± 0.03 μs 1.01 ± 0.02
UNIT TESTS/StateEstimator/Luenberger/evaloutput 0.25 ± 0.01 μs 0.241 ± 0.01 μs 1.04 ± 0.06
UNIT TESTS/StateEstimator/Luenberger/preparestate! 0.26 ± 0.01 μs 0.251 ± 0.001 μs 1.04 ± 0.04
UNIT TESTS/StateEstimator/Luenberger/updatestate! 0.351 ± 0.01 μs 0.351 ± 0.01 μs 1 ± 0.04
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/LinModel 0.212 ± 0.024 ms 0.194 ± 0.022 ms 1.09 ± 0.17
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/NonLinModel 0.352 ± 0.019 ms 0.354 ± 0.018 ms 0.995 ± 0.073
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Current form 3.45 ± 0.15 ms 3.51 ± 0.22 ms 0.984 ± 0.074
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Prediction form 0.481 ± 0.009 μs 0.491 ± 0.01 μs 0.98 ± 0.027
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Current form 0.309 ± 0.017 ms 0.311 ± 0.017 ms 0.991 ± 0.077
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Prediction form 1.32 ± 0.001 μs 1.33 ± 0.01 μs 0.992 ± 0.0075
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Current form 7.68 ± 3.2 μs 6.52 ± 2.1 μs 1.18 ± 0.62
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Prediction form 3.2 ± 0.16 ms 3.06 ± 0.15 ms 1.05 ± 0.074
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Current form 16.6 ± 0.6 μs 16.5 ± 0.39 μs 1.01 ± 0.043
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Prediction form 0.327 ± 0.018 ms 0.329 ± 0.018 ms 0.993 ± 0.076
UNIT TESTS/StateEstimator/SteadyKalmanFilter/evaloutput 0.271 ± 0.01 μs 0.28 ± 0.01 μs 0.968 ± 0.05
UNIT TESTS/StateEstimator/SteadyKalmanFilter/preparestate! 0.28 ± 0.01 μs 0.29 ± 0.01 μs 0.966 ± 0.048
UNIT TESTS/StateEstimator/SteadyKalmanFilter/updatestate! 0.381 ± 0.01 μs 0.381 ± 0.011 μs 1 ± 0.039
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/LinModel 0.301 ± 0.01 μs 0.31 ± 0.001 μs 0.971 ± 0.032
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/NonLinModel 0.932 ± 0.01 μs 0.922 ± 0.011 μs 1.01 ± 0.016
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/LinModel 3.59 ± 0.029 μs 3.86 ± 0.031 μs 0.93 ± 0.011
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/NonLinModel 5.16 ± 0.039 μs 4.95 ± 0.04 μs 1.04 ± 0.012
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/LinModel 3.45 ± 0.039 μs 3.52 ± 0.04 μs 0.98 ± 0.016
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/NonLinModel 6.25 ± 0.05 μs 6.41 ± 0.05 μs 0.975 ± 0.011
time_to_load 5.34 ± 0.0028 s 5.52 ± 0.037 s 0.967 ± 0.0065
Memory benchmarks
main b4ba499... main / b4ba499...
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/DAQP/SingleShooting 0.0424 M allocs: 1.71 MB 0.0424 M allocs: 1.71 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/MultipleShooting 0.162 M allocs: 8.9 MB 0.162 M allocs: 8.9 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/SingleShooting 0.0536 M allocs: 2.38 MB 0.0536 M allocs: 2.38 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/MultipleShooting 0.0758 M allocs: 1.95 MB 0.0758 M allocs: 1.95 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/SingleShooting 7.85 k allocs: 0.249 MB 7.85 k allocs: 0.249 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/DAQP/SingleShooting 0.0423 M allocs: 1.7 MB 0.0423 M allocs: 1.7 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/MultipleShooting 0.127 M allocs: 7.07 MB 0.127 M allocs: 7.07 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/SingleShooting 0.0553 M allocs: 2.42 MB 0.0553 M allocs: 2.42 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/MultipleShooting 0.0532 M allocs: 1.39 MB 0.0532 M allocs: 1.39 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/SingleShooting 7.7 k allocs: 0.243 MB 7.7 k allocs: 0.243 MB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/DAQP/SingleShooting 0.113 M allocs: 6.14 MB 0.114 M allocs: 6.25 MB 0.983
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/MultipleShooting 4.65 M allocs: 0.25 GB 4.65 M allocs: 0.251 GB 0.998
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/SingleShooting 0.113 M allocs: 6.56 MB 0.115 M allocs: 6.67 MB 0.984
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/MultipleShooting 4.68 M allocs: 0.254 GB 4.69 M allocs: 0.255 GB 0.998
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/SingleShooting 0.124 M allocs: 7.69 MB 0.126 M allocs: 7.8 MB 0.986
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting 0.351 M allocs: 19.7 MB 0.351 M allocs: 19.7 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting (Hessian) 0.862 M allocs: 0.0789 GB 0.862 M allocs: 0.0792 GB 0.997
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/SingleShooting 0.353 M allocs: 16.7 MB 0.353 M allocs: 16.7 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation 1.18 M allocs: 0.0789 GB 1.18 M allocs: 0.0791 GB 0.997
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation (Hessian) 1.18 M allocs: 0.0789 GB 1.18 M allocs: 0.0791 GB 0.997
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting 0.267 M allocs: 14.7 MB 0.267 M allocs: 14.7 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting (Hessian) 0.633 M allocs: 0.0602 GB 0.633 M allocs: 0.0604 GB 0.998
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting 0.0951 M allocs: 3.9 MB 0.0951 M allocs: 3.9 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting (Hessian) 0.0772 M allocs: 4.95 MB 0.0772 M allocs: 5.08 MB 0.974
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation 0.376 M allocs: 19.7 MB 0.376 M allocs: 19.7 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation (Hessian) 1.07 M allocs: 0.0794 GB 1.07 M allocs: 0.0796 GB 0.998
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting 0.297 M allocs: 0.0649 GB 0.297 M allocs: 0.067 GB 0.969
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting 0.226 M allocs: 12.2 MB 0.226 M allocs: 12.2 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (Hessian) 0.647 M allocs: 0.0541 GB 0.647 M allocs: 0.0543 GB 0.997
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.244 M allocs: 20.1 MB 0.244 M allocs: 20.7 MB 0.969
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting 0.0741 M allocs: 3 MB 0.0741 M allocs: 3 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting (Hessian) 0.0768 M allocs: 4.91 MB 0.0768 M allocs: 5.04 MB 0.974
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation 0.317 M allocs: 16.4 MB 0.317 M allocs: 16.4 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (Hessian) 0.879 M allocs: 0.0547 GB 0.879 M allocs: 0.0548 GB 0.998
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.335 M allocs: 24.4 MB 0.335 M allocs: 25.1 MB 0.968
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting 0.255 M allocs: 0.056 GB 0.255 M allocs: 0.0577 GB 0.97
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Current form 0.762 M allocs: 0.0802 GB 0.762 M allocs: 0.0802 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Prediction form 0.682 M allocs: 0.0585 GB 0.682 M allocs: 0.0585 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Current form 0.646 M allocs: 0.0785 GB 0.647 M allocs: 0.0803 GB 0.978
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Prediction form 0.601 M allocs: 0.0562 GB 0.601 M allocs: 0.0562 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Current form 0.63 M allocs: 0.0764 GB 0.63 M allocs: 0.0764 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Prediction form 0.585 M allocs: 0.0553 GB 0.585 M allocs: 0.0553 GB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form 0.0649 M allocs: 11.5 MB 0.0649 M allocs: 11.5 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian) 0.0639 M allocs: 11.3 MB 0.0639 M allocs: 11.3 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form 0.0485 M allocs: 8.05 MB 0.0485 M allocs: 8.05 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian) 0.0642 M allocs: 11.3 MB 0.0642 M allocs: 11.3 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Current form 15.2 M allocs: 2.8 GB 15.2 M allocs: 2.8 GB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Prediction form 8.88 M allocs: 1.63 GB 8.88 M allocs: 1.63 GB 1
UNIT TESTS/PredictiveController/ExplicitMPC/moveinput! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/PredictiveController/LinMPC/getinfo! 0.322 k allocs: 15.6 kB 0.322 k allocs: 15.6 kB 1
UNIT TESTS/PredictiveController/LinMPC/moveinput!/MultipleShooting 0.994 k allocs: 25.5 kB 0.994 k allocs: 25.5 kB 1
UNIT TESTS/PredictiveController/LinMPC/moveinput!/SingleShooting 0.088 k allocs: 2.23 kB 0.088 k allocs: 2.23 kB 1
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/LinModel 0.563 k allocs: 0.0579 MB 0.563 k allocs: 0.0588 MB 0.985
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/NonLinModel 0.606 k allocs: 0.0769 MB 0.606 k allocs: 0.0776 MB 0.991
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/MultipleShooting 2.4 k allocs: 0.107 MB 2.4 k allocs: 0.107 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/SingleShooting 0.37 k allocs: 13.1 kB 0.37 k allocs: 13.1 kB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShooting 2.64 k allocs: 0.126 MB 2.64 k allocs: 0.126 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShootingHessian 3.15 k allocs: 0.158 MB 3.15 k allocs: 0.158 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShooting 0.404 k allocs: 14.7 kB 0.404 k allocs: 14.7 kB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShootingHessian 0.404 k allocs: 14.7 kB 0.404 k allocs: 14.7 kB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/TrapezoidalCollocation 2.01 k allocs: 0.0858 MB 2.01 k allocs: 0.0858 MB 1
UNIT TESTS/SimModel/LinModel/evaloutput 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/SimModel/LinModel/updatestate! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/SimModel/NonLinModel/evaloutput 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/SimModel/NonLinModel/linearize! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/SimModel/NonLinModel/updatestate! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/LinModel 4 allocs: 0.0938 kB 4 allocs: 0.0938 kB 1
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/NonLinModel 4 allocs: 0.0938 kB 4 allocs: 0.0938 kB 1
UNIT TESTS/StateEstimator/InternalModel/evaloutput/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/InternalModel/evaloutput/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/InternalModel/preparestate!/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/InternalModel/preparestate!/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/InternalModel/updatestate!/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/InternalModel/updatestate!/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/KalmanFilter/evaloutput 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/KalmanFilter/preparestate! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/KalmanFilter/updatestate! 4 allocs: 0.0938 kB 4 allocs: 0.0938 kB 1
UNIT TESTS/StateEstimator/Luenberger/evaloutput 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/Luenberger/preparestate! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/Luenberger/updatestate! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/LinModel 1.03 k allocs: 0.0393 MB 1.03 k allocs: 0.0393 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/NonLinModel 1.24 k allocs: 0.203 MB 1.24 k allocs: 0.203 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Current form 0.0754 M allocs: 14.6 MB 0.0754 M allocs: 14.7 MB 0.996
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Prediction form 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Current form 0.972 k allocs: 25.4 kB 0.972 k allocs: 25.4 kB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Prediction form 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Current form 2 allocs: 0.0469 kB 2 allocs: 0.0469 kB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Prediction form 7.05 k allocs: 0.443 MB 7.05 k allocs: 0.443 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Current form 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Prediction form 0.972 k allocs: 25.4 kB 0.972 k allocs: 25.4 kB 1
UNIT TESTS/StateEstimator/SteadyKalmanFilter/evaloutput 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/SteadyKalmanFilter/preparestate! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/SteadyKalmanFilter/updatestate! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/LinModel 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/NonLinModel 0 allocs: 0 B 0 allocs: 0 B
time_to_load 0.149 k allocs: 11.2 kB 0.149 k allocs: 11.2 kB 1

@franckgaga franckgaga merged commit e04ec3a into main Feb 6, 2026
6 checks passed
@franckgaga franckgaga deleted the custom_linconstraint branch February 6, 2026 04:00
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.

2 participants