Skip to content

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

Open
franckgaga wants to merge 44 commits intomainfrom
custom_linconstraint
Open

added: custom linear inequality constraints for LinMPC and NonLinMPC#310
franckgaga wants to merge 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.39 ± 0.43 ms 5.48 ± 0.53 ms 0.983 ± 0.12
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/MultipleShooting 0.31 ± 0.0065 s 0.313 ± 0.0048 s 0.991 ± 0.026
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/SingleShooting 0.22 ± 0.015 s 0.226 ± 0.011 s 0.974 ± 0.08
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/MultipleShooting 9.03 ± 0.45 ms 9.05 ± 0.51 ms 0.998 ± 0.075
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/SingleShooting 1.61 ± 0.022 ms 1.88 ± 0.051 ms 0.86 ± 0.026
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/DAQP/SingleShooting 5.31 ± 0.41 ms 5.43 ± 0.53 ms 0.978 ± 0.12
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/MultipleShooting 0.278 ± 0.0069 s 0.272 ± 0.0036 s 1.02 ± 0.028
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/SingleShooting 0.24 ± 0.0013 s 0.23 ± 0.0044 s 1.04 ± 0.021
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/MultipleShooting 6.12 ± 0.36 ms 6.31 ± 0.4 ms 0.971 ± 0.084
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/SingleShooting 1.72 ± 0.023 ms 1.97 ± 0.067 ms 0.873 ± 0.032
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/DAQP/SingleShooting 9.68 ± 1.4 ms 9.87 ± 1.5 ms 0.981 ± 0.21
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/MultipleShooting 0.304 ± 0.061 s 0.305 ± 0.044 s 0.994 ± 0.25
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/SingleShooting 0.156 ± 0.0016 s 0.156 ± 0.0017 s 1 ± 0.015
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/MultipleShooting 0.0987 ± 0.022 s 0.098 ± 0.023 s 1.01 ± 0.33
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/SingleShooting 12.9 ± 1.4 ms 13 ± 1.4 ms 0.992 ± 0.15
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting 0.68 ± 0.013 s 0.682 ± 0.021 s 0.997 ± 0.036
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting (Hessian) 0.652 ± 0.044 s 0.659 ± 0.044 s 0.988 ± 0.094
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/SingleShooting 1.68 ± 0.031 s 1.69 ± 0.049 s 0.998 ± 0.034
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation 0.482 ± 0.055 s 0.489 ± 0.055 s 0.986 ± 0.16
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation (Hessian) 0.482 ± 0.052 s 0.488 ± 0.055 s 0.986 ± 0.15
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting 0.351 ± 0.0063 s 0.353 ± 0.0056 s 0.995 ± 0.024
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting (Hessian) 0.434 ± 0.044 s 0.438 ± 0.046 s 0.99 ± 0.14
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting 0.48 ± 0.0079 s 0.483 ± 0.0077 s 0.993 ± 0.023
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting (Hessian) 0.162 ± 0.0043 s 0.164 ± 0.0041 s 0.99 ± 0.036
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation 0.324 ± 0.0056 s 0.326 ± 0.0076 s 0.995 ± 0.029
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation (Hessian) 0.381 ± 0.045 s 0.394 ± 0.047 s 0.965 ± 0.16
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting 0.146 ± 0.015 s 0.147 ± 0.015 s 0.997 ± 0.14
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting 0.339 ± 0.003 s 0.339 ± 0.0036 s 0.999 ± 0.014
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (Hessian) 0.397 ± 0.037 s 0.396 ± 0.036 s 1 ± 0.13
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.357 ± 0.011 s 0.358 ± 0.012 s 0.996 ± 0.047
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting 0.486 ± 0.009 s 0.484 ± 0.012 s 1 ± 0.031
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting (Hessian) 0.164 ± 0.0022 s 0.166 ± 0.0037 s 0.989 ± 0.026
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation 0.315 ± 0.0047 s 0.318 ± 0.0055 s 0.989 ± 0.023
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (Hessian) 0.295 ± 0.026 s 0.294 ± 0.028 s 1 ± 0.13
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.352 ± 0.0095 s 0.357 ± 0.0092 s 0.986 ± 0.037
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting 0.124 ± 0.0089 s 0.125 ± 0.0085 s 0.996 ± 0.099
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Current form 0.0384 ± 0.0014 s 0.0377 ± 0.0014 s 1.02 ± 0.051
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Prediction form 0.0318 ± 0.0076 s 0.0316 ± 0.0082 s 1.01 ± 0.36
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Current form 0.169 ± 0.037 s 0.185 ± 0.039 s 0.913 ± 0.28
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Prediction form 0.16 ± 0.026 s 0.156 ± 0.029 s 1.03 ± 0.26
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Current form 0.0327 ± 0.0023 s 0.0316 ± 0.0025 s 1.03 ± 0.11
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Prediction form 26.5 ± 5.9 ms 25.6 ± 6 ms 1.04 ± 0.34
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form 0.0803 ± 0.0015 s 0.0815 ± 0.0016 s 0.986 ± 0.027
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian) 0.0764 ± 0.001 s 0.0812 ± 0.0024 s 0.941 ± 0.031
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form 0.0631 ± 0.0022 s 0.0641 ± 0.0018 s 0.985 ± 0.044
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian) 0.0825 ± 0.0027 s 0.0818 ± 0.0018 s 1.01 ± 0.039
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Current form 2.39 ± 0.013 s 2.38 ± 0.0091 s 1 ± 0.0068
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Prediction form 1.41 ± 0.011 s 1.41 ± 0.0082 s 1 ± 0.0097
UNIT TESTS/PredictiveController/ExplicitMPC/moveinput! 3.78 ± 0.03 μs 4.15 ± 0.04 μs 0.911 ± 0.011
UNIT TESTS/PredictiveController/LinMPC/getinfo! 0.109 ± 0.0022 ms 0.11 ± 0.0021 ms 0.989 ± 0.027
UNIT TESTS/PredictiveController/LinMPC/moveinput!/MultipleShooting 0.106 ± 0.0014 ms 0.106 ± 0.0013 ms 1 ± 0.018
UNIT TESTS/PredictiveController/LinMPC/moveinput!/SingleShooting 14.6 ± 0.29 μs 16.2 ± 0.34 μs 0.904 ± 0.026
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/LinModel 0.199 ± 0.011 ms 0.204 ± 0.011 ms 0.98 ± 0.075
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/NonLinModel 0.245 ± 0.013 ms 0.244 ± 0.014 ms 1 ± 0.079
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/MultipleShooting 2.54 ± 0.21 ms 2.56 ± 0.23 ms 0.992 ± 0.12
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/SingleShooting 1.76 ± 0.09 ms 1.78 ± 0.075 ms 0.987 ± 0.065
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShooting 3.03 ± 0.1 ms 3.05 ± 0.1 ms 0.996 ± 0.047
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShootingHessian 3.24 ± 0.19 ms 3.26 ± 0.16 ms 0.995 ± 0.077
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShooting 1.74 ± 0.056 ms 1.74 ± 0.047 ms 0.996 ± 0.042
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShootingHessian 1.72 ± 0.035 ms 1.74 ± 0.044 ms 0.992 ± 0.032
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/TrapezoidalCollocation 2.22 ± 0.14 ms 2.26 ± 0.13 ms 0.981 ± 0.083
UNIT TESTS/SimModel/LinModel/evaloutput 0.14 ± 0.001 μs 0.15 ± 0.01 μs 0.933 ± 0.063
UNIT TESTS/SimModel/LinModel/updatestate! 0.201 ± 0.01 μs 0.211 ± 0.01 μs 0.953 ± 0.065
UNIT TESTS/SimModel/NonLinModel/evaloutput 0.421 ± 0.01 μs 0.421 ± 0.001 μs 1 ± 0.024
UNIT TESTS/SimModel/NonLinModel/linearize! 2.01 ± 0.029 μs 2.07 ± 0.03 μs 0.971 ± 0.02
UNIT TESTS/SimModel/NonLinModel/updatestate! 0.491 ± 0.01 μs 0.491 ± 0.001 μs 1 ± 0.02
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/LinModel 0.561 ± 0.01 μs 0.551 ± 0 μs 1.02 ± 0.018
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/NonLinModel 1.79 ± 0.019 μs 1.81 ± 0.02 μs 0.988 ± 0.015
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/LinModel 0.27 ± 0.001 μs 0.291 ± 0.01 μs 0.928 ± 0.032
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/NonLinModel 1.42 ± 0.011 μs 1.41 ± 0.011 μs 1.01 ± 0.011
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/LinModel 3.93 ± 0.059 μs 4.01 ± 0.071 μs 0.98 ± 0.023
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/NonLinModel 9.03 ± 0.091 μs 8.78 ± 0.08 μs 1.03 ± 0.014
UNIT TESTS/StateEstimator/InternalModel/evaloutput/LinModel 0.24 ± 0.01 μs 0.24 ± 0.01 μs 1 ± 0.059
UNIT TESTS/StateEstimator/InternalModel/evaloutput/NonLinModel 0.581 ± 0.01 μs 0.571 ± 0.001 μs 1.02 ± 0.018
UNIT TESTS/StateEstimator/InternalModel/preparestate!/LinModel 0.28 ± 0.001 μs 0.29 ± 0.01 μs 0.966 ± 0.033
UNIT TESTS/StateEstimator/InternalModel/preparestate!/NonLinModel 0.731 ± 0.01 μs 0.741 ± 0.01 μs 0.987 ± 0.019
UNIT TESTS/StateEstimator/InternalModel/updatestate!/LinModel 0.411 ± 0.01 μs 0.42 ± 0.01 μs 0.979 ± 0.033
UNIT TESTS/StateEstimator/InternalModel/updatestate!/NonLinModel 0.922 ± 0.001 μs 0.922 ± 0.001 μs 1 ± 0.0015
UNIT TESTS/StateEstimator/KalmanFilter/evaloutput 0.261 ± 0.01 μs 0.261 ± 0.011 μs 1 ± 0.057
UNIT TESTS/StateEstimator/KalmanFilter/preparestate! 0.14 ± 0.01 μs 0.14 ± 0.01 μs 1 ± 0.1
UNIT TESTS/StateEstimator/KalmanFilter/updatestate! 2.54 ± 0.03 μs 2.52 ± 0.03 μs 1.01 ± 0.017
UNIT TESTS/StateEstimator/Luenberger/evaloutput 0.24 ± 0.01 μs 0.241 ± 0.011 μs 0.996 ± 0.062
UNIT TESTS/StateEstimator/Luenberger/preparestate! 0.26 ± 0.01 μs 0.26 ± 0.01 μs 1 ± 0.054
UNIT TESTS/StateEstimator/Luenberger/updatestate! 0.351 ± 0.001 μs 0.36 ± 0.01 μs 0.975 ± 0.027
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/LinModel 0.185 ± 0.012 ms 0.181 ± 0.012 ms 1.02 ± 0.097
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/NonLinModel 0.346 ± 0.017 ms 0.351 ± 0.017 ms 0.986 ± 0.068
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Current form 3.48 ± 0.17 ms 3.43 ± 0.16 ms 1.02 ± 0.069
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Prediction form 0.511 ± 0.01 μs 0.481 ± 0.01 μs 1.06 ± 0.03
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Current form 0.302 ± 0.016 ms 0.304 ± 0.017 ms 0.995 ± 0.076
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Prediction form 1.32 ± 0.01 μs 1.32 ± 0.011 μs 0.999 ± 0.011
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Current form 6.41 ± 1.5 μs 6 ± 1.4 μs 1.07 ± 0.35
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Prediction form 2.99 ± 0.1 ms 3.02 ± 0.11 ms 0.99 ± 0.05
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Current form 16.3 ± 0.32 μs 16.7 ± 0.3 μs 0.975 ± 0.026
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Prediction form 0.319 ± 0.017 ms 0.32 ± 0.017 ms 0.998 ± 0.075
UNIT TESTS/StateEstimator/SteadyKalmanFilter/evaloutput 0.28 ± 0.011 μs 0.271 ± 0.01 μs 1.03 ± 0.056
UNIT TESTS/StateEstimator/SteadyKalmanFilter/preparestate! 0.281 ± 0.011 μs 0.29 ± 0.01 μs 0.969 ± 0.051
UNIT TESTS/StateEstimator/SteadyKalmanFilter/updatestate! 0.371 ± 0.01 μs 0.391 ± 0.01 μs 0.949 ± 0.035
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/LinModel 0.301 ± 0.001 μs 0.3 ± 0.001 μs 1 ± 0.0047
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/NonLinModel 0.902 ± 0.01 μs 0.932 ± 0.02 μs 0.968 ± 0.023
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/LinModel 3.84 ± 0.03 μs 3.78 ± 0.079 μs 1.02 ± 0.023
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/NonLinModel 4.94 ± 0.051 μs 5.06 ± 0.031 μs 0.976 ± 0.012
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/LinModel 3.52 ± 0.07 μs 3.54 ± 0.05 μs 0.994 ± 0.024
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/NonLinModel 6.26 ± 0.14 μs 6.41 ± 0.05 μs 0.976 ± 0.023
time_to_load 5.61 ± 0.0071 s 5.39 ± 0.034 s 1.04 ± 0.0067
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.646 M allocs: 0.0785 GB 1
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.6 MB 1
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

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