Skip to content

added: stochastic defects treated as linear equality constraints in MovingHorizonEstimator - #421

Merged
franckgaga merged 9 commits into
mainfrom
mhe_ms_stoch_defect_lin
Aug 5, 2026
Merged

added: stochastic defects treated as linear equality constraints in MovingHorizonEstimator#421
franckgaga merged 9 commits into
mainfrom
mhe_ms_stoch_defect_lin

Conversation

@franckgaga

@franckgaga franckgaga commented Aug 5, 2026

Copy link
Copy Markdown
Member

Similarly to #336 and #335, this PR modified the MovingHorizonEstimator internals to treat the state defects of the unmeasured disturbance model as linear equality constraints, even if the plant model is a NonLinModel (related to nint_ym and nint_u options).

This change is visible to the user by noticing that the number of linear equality constraints is no longer zero when the plant model is a NonLinModel with a MultipleShooting transcription (and the number of nonlinear equality constraints is lower than nx̂*He):

MovingHorizonEstimator estimator with a sample time Ts = 4.0 s:
├ model: NonLinModel
├ optimizer: Ipopt 
├ transcription: MultipleShooting
├ gradient: AutoForwardDiff
├ jacobian: AutoSparse (AutoForwardDiff, TracerSparsityDetector, GreedyColoringAlgorithm)
├ hessian: AutoSparse (AutoForwardDiff, TracerSparsityDetector, GreedyColoringAlgorithm)
├ arrival covariance: UnscentedKalmanFilter 
├ direct: true
└ dimensions:
  │ ├ 2 estimation steps He
  │ ├ 2 manipulated inputs u (0 integrating states)
  │ ├ 6 estimated states x̂
  │ ├ 2 measured outputs ym (2 integrating states)
  │ ├ 0 unmeasured outputs yu
  │ └ 1 measured disturbances d
  └ optimization:
    ├ 31 decision variables Z̃ (1 slack variable, 4 bounds)
    ├  0 linear inequality constraints A
    ├  4 linear equality constraints Aeq
    ├ 11 nonlinear inequality constraints g (11 custom)
    └  8 nonlinear equality constraints geq

@codecov-commenter

codecov-commenter commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.41%. Comparing base (6fb787d) to head (b267dff).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #421   +/-   ##
=======================================
  Coverage   98.40%   98.41%           
=======================================
  Files          29       29           
  Lines        6143     6166   +23     
=======================================
+ Hits         6045     6068   +23     
  Misses         98       98           

☔ View full report in Codecov by Harness.
📢 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 5581d8c into main Aug 5, 2026
5 checks passed
@franckgaga
franckgaga deleted the mhe_ms_stoch_defect_lin branch August 5, 2026 23:10
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Benchmark Results (Julia v1)

Time benchmarks
main b267dff... main / b267dff...
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/DAQP/SingleShooting 5.8 ± 0.81 ms 5.88 ± 0.81 ms 0.988 ± 0.19
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/MultipleShooting 11.6 ± 0.71 ms 12.3 ± 0.63 ms 0.947 ± 0.075
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/SingleShooting 2.05 ± 0.022 ms 2.06 ± 0.03 ms 0.996 ± 0.018
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/DAQP/SingleShooting 5.81 ± 0.8 ms 5.79 ± 0.76 ms 1 ± 0.19
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/MultipleShooting 8.1 ± 0.56 ms 8.72 ± 0.54 ms 0.929 ± 0.086
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/SingleShooting 2.12 ± 0.023 ms 2.12 ± 0.028 ms 0.997 ± 0.017
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/DAQP/SingleShooting 10.6 ± 1.2 ms 10.7 ± 1.3 ms 0.994 ± 0.17
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/MultipleShooting 0.112 ± 0.023 s 0.118 ± 0.025 s 0.951 ± 0.28
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/SingleShooting 15.3 ± 1.8 ms 15.5 ± 1.9 ms 0.991 ± 0.17
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting 0.548 ± 0.0048 s 0.538 ± 0.0047 s 1.02 ± 0.013
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting (Hessian) 1.11 ± 0.025 s 1.09 ± 0.012 s 1.03 ± 0.025
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/SingleShooting 1.65 ± 0.0061 s 1.61 ± 0.0079 s 1.03 ± 0.0063
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation 0.91 ± 0.0093 s 0.893 ± 0.015 s 1.02 ± 0.021
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation (Hessian) 0.91 ± 0.012 s 0.896 ± 0.0081 s 1.02 ± 0.016
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting 0.371 ± 0.0085 s 0.373 ± 0.0019 s 0.993 ± 0.023
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting (Hessian) 0.371 ± 0.0071 s 0.373 ± 0.0051 s 0.995 ± 0.023
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/OrthogonalCollocation 0.534 ± 0.0029 s 0.529 ± 0.0038 s 1.01 ± 0.009
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/OrthogonalCollocation (Hessian) 0.552 ± 0.008 s 0.559 ± 0.0067 s 0.988 ± 0.019
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting 0.568 ± 0.0083 s 0.551 ± 0.0015 s 1.03 ± 0.015
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting (Hessian) 0.187 ± 0.0033 s 0.188 ± 0.0031 s 0.991 ± 0.024
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation 0.341 ± 0.0047 s 0.337 ± 0.0025 s 1.01 ± 0.016
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation (Hessian) 0.299 ± 0.0084 s 0.301 ± 0.0027 s 0.995 ± 0.029
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting (Hessian) 0.0885 ± 0.0036 s 0.0849 ± 0.00069 s 1.04 ± 0.043
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Uno/MultipleShooting (Hessian) 0.125 ± 0.001 s 0.122 ± 0.0011 s 1.03 ± 0.012
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting 0.356 ± 0.0038 s 0.352 ± 0.0046 s 1.01 ± 0.017
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (Hessian) 0.319 ± 0.0039 s 0.332 ± 0.0059 s 0.961 ± 0.021
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.381 ± 0.0039 s 0.374 ± 0.0049 s 1.02 ± 0.017
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/OrthogonalCollocation 0.62 ± 0.0041 s 0.612 ± 0.0058 s 1.01 ± 0.012
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/OrthogonalCollocation (Hessian) 1.65 ± 0.02 s 1.7 ± 0.14 s 0.969 ± 0.08
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting 0.532 ± 0.0071 s 0.538 ± 0.0071 s 0.988 ± 0.019
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting (Hessian) 0.18 ± 0.0014 s 0.193 ± 0.0039 s 0.931 ± 0.02
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation 0.345 ± 0.0029 s 0.357 ± 0.0046 s 0.966 ± 0.015
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (Hessian) 0.265 ± 0.0025 s 0.28 ± 0.0044 s 0.947 ± 0.018
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.366 ± 0.0046 s 0.385 ± 0.0072 s 0.949 ± 0.021
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/MultipleShooting (Hessian) 0.213 ± 0.0048 s 0.214 ± 0.0043 s 0.992 ± 0.03
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting (Hessian) 0.081 ± 0.0022 s 0.0822 ± 0.002 s 0.985 ± 0.036
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Uno/MultipleShooting (Hessian) 0.108 ± 0.0021 s 0.107 ± 0.0009 s 1 ± 0.021
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Current form 0.0771 ± 0.0067 s 0.0724 ± 0.0057 s 1.07 ± 0.13
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Prediction form 0.056 ± 0.0079 s 0.0537 ± 0.0051 s 1.04 ± 0.18
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Current form 0.0711 ± 0.0027 s 0.0683 ± 0.0036 s 1.04 ± 0.068
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/MultipleShooting 0.069 ± 0.01 s 0.066 ± 0.013 s 1.05 ± 0.26
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Prediction form 0.0495 ± 0.0039 s 0.0454 ± 0.0035 s 1.09 ± 0.12
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian) 0.0978 ± 0.0031 s 0.0937 ± 0.00087 s 1.04 ± 0.034
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian, MultipleShooting) 0.122 ± 0.0022 s 0.116 ± 0.0026 s 1.05 ± 0.03
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian) 0.1 ± 0.0022 s 0.0927 ± 0.0014 s 1.08 ± 0.029
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian, MultipleShooting) 0.116 ± 0.0018 s 0.107 ± 0.0011 s 1.09 ± 0.021
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Current form (Hessian) 0.0517 ± 0.0021 s 0.0488 ± 0.00079 s 1.06 ± 0.047
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Prediction form (Hessian) 0.0496 ± 0.0012 s 0.0466 ± 0.0012 s 1.06 ± 0.037
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Uno/Current form (Hessian) 17.1 ± 1.2 ms 17.1 ± 0.55 ms 1 ± 0.077
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Uno/Current form (Hessian, MultipleShooting) 21.1 ± 0.32 ms 22.3 ± 0.34 ms 0.945 ± 0.02
UNIT TESTS/PredictiveController/ExplicitMPC/moveinput! 3.66 ± 0.15 μs 3.93 ± 0.18 μs 0.931 ± 0.057
UNIT TESTS/PredictiveController/LinMPC/getinfo! 0.109 ± 0.0023 ms 0.111 ± 0.0023 ms 0.982 ± 0.028
UNIT TESTS/PredictiveController/LinMPC/moveinput!/MultipleShooting 0.134 ± 0.0089 ms 0.135 ± 0.0097 ms 0.995 ± 0.097
UNIT TESTS/PredictiveController/LinMPC/moveinput!/SingleShooting 16.8 ± 0.36 μs 17 ± 0.28 μs 0.989 ± 0.027
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/LinModel 0.172 ± 0.01 ms 0.171 ± 0.0094 ms 1 ± 0.08
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/NonLinModel 0.247 ± 0.041 ms 0.232 ± 0.022 ms 1.07 ± 0.2
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/MultipleShooting 1.08 ± 0.22 ms 1.08 ± 0.22 ms 0.994 ± 0.29
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/SingleShooting 0.47 ± 0.032 ms 0.469 ± 0.029 ms 1 ± 0.091
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShooting 10.6 ± 0.5 ms 10.6 ± 0.46 ms 1 ± 0.064
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShootingHessian 10.8 ± 0.63 ms 10.7 ± 0.81 ms 1 ± 0.096
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/OrthogonalCollocation 11.3 ± 1.7 ms 11.7 ± 1.5 ms 0.967 ± 0.2
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/OrthogonalCollocationHessian 10.2 ± 0.57 ms 10.9 ± 0.67 ms 0.935 ± 0.078
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShooting 7.5 ± 0.41 ms 7.49 ± 0.64 ms 1 ± 0.1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShootingHessian 7.81 ± 0.69 ms 7.48 ± 0.53 ms 1.04 ± 0.12
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/TrapezoidalCollocation 7.51 ± 0.4 ms 7.53 ± 0.64 ms 0.998 ± 0.1
UNIT TESTS/SimModel/LinModel/evaloutput 0.13 ± 0.001 μs 0.13 ± 0.001 μs 1 ± 0.011
UNIT TESTS/SimModel/LinModel/updatestate! 0.18 ± 0.001 μs 0.18 ± 0.001 μs 1 ± 0.0079
UNIT TESTS/SimModel/NonLinModel/evaloutput 0.391 ± 0.001 μs 0.401 ± 0.01 μs 0.975 ± 0.024
UNIT TESTS/SimModel/NonLinModel/linearize! 1.94 ± 0.029 μs 1.93 ± 0.03 μs 1.01 ± 0.022
UNIT TESTS/SimModel/NonLinModel/updatestate! 0.451 ± 0.001 μs 0.45 ± 0.01 μs 1 ± 0.022
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/LinModel 0.571 ± 0.01 μs 0.552 ± 0.01 μs 1.03 ± 0.026
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/NonLinModel 1.78 ± 0.011 μs 1.77 ± 0.02 μs 1.01 ± 0.013
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/LinModel 0.3 ± 0.01 μs 0.301 ± 0.001 μs 0.997 ± 0.033
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/NonLinModel 1.41 ± 0.01 μs 1.38 ± 0.019 μs 1.02 ± 0.016
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/LinModel 4.15 ± 0.06 μs 4.05 ± 0.04 μs 1.02 ± 0.018
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/NonLinModel 8.67 ± 0.09 μs 8.78 ± 0.081 μs 0.987 ± 0.014
UNIT TESTS/StateEstimator/InternalModel/evaloutput/LinModel 0.25 ± 0.01 μs 0.24 ± 0.01 μs 1.04 ± 0.06
UNIT TESTS/StateEstimator/InternalModel/evaloutput/NonLinModel 0.581 ± 0 μs 0.581 ± 0.001 μs 1 ± 0.0017
UNIT TESTS/StateEstimator/InternalModel/preparestate!/LinModel 0.311 ± 0.01 μs 0.301 ± 0.011 μs 1.03 ± 0.05
UNIT TESTS/StateEstimator/InternalModel/preparestate!/NonLinModel 0.731 ± 0.01 μs 0.721 ± 0.001 μs 1.01 ± 0.014
UNIT TESTS/StateEstimator/InternalModel/updatestate!/LinModel 0.441 ± 0.001 μs 0.451 ± 0.01 μs 0.978 ± 0.022
UNIT TESTS/StateEstimator/InternalModel/updatestate!/NonLinModel 1.21 ± 0.019 μs 1.21 ± 0.01 μs 1 ± 0.018
UNIT TESTS/StateEstimator/KalmanFilter/evaloutput 0.261 ± 0.011 μs 0.261 ± 0.01 μs 1 ± 0.057
UNIT TESTS/StateEstimator/KalmanFilter/preparestate! 0.14 ± 0.001 μs 0.14 ± 0 μs 1 ± 0.0071
UNIT TESTS/StateEstimator/KalmanFilter/updatestate! 2.63 ± 0.039 μs 2.64 ± 0.04 μs 1 ± 0.021
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.31 ± 0.01 μs 0.31 ± 0.01 μs 1 ± 0.046
UNIT TESTS/StateEstimator/Luenberger/updatestate! 0.341 ± 0.011 μs 0.351 ± 0.01 μs 0.972 ± 0.042
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/LinModel 0.263 ± 0.023 ms 0.27 ± 0.03 ms 0.974 ± 0.14
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/NonLinModel 0.428 ± 0.07 ms 0.431 ± 0.067 ms 0.992 ± 0.22
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Constant arr. cov. 0.035 ± 0.002 s 29.7 ± 1 ms 1.18 ± 0.078
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Current form 0.032 ± 0.0041 s 29.7 ± 0.86 ms 1.08 ± 0.14
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/MultipleShooting 9.14 ± 0.96 ms 8.92 ± 0.68 ms 1.02 ± 0.13
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Current form 0.34 ± 0.024 ms 0.321 ± 0.023 ms 1.06 ± 0.11
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/MultipleShooting 0.76 ± 0.017 ms 0.737 ± 0.017 ms 1.03 ± 0.033
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Prediction form 30.2 ± 4.2 ms 27.7 ± 1.2 ms 1.09 ± 0.16
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Prediction form 0.36 ± 0.025 ms 0.35 ± 0.024 ms 1.03 ± 0.1
UNIT TESTS/StateEstimator/SteadyKalmanFilter/evaloutput 0.261 ± 0.019 μs 0.261 ± 0.001 μs 1 ± 0.073
UNIT TESTS/StateEstimator/SteadyKalmanFilter/preparestate! 0.351 ± 0.019 μs 0.33 ± 0.01 μs 1.06 ± 0.066
UNIT TESTS/StateEstimator/SteadyKalmanFilter/updatestate! 0.361 ± 0.011 μs 0.361 ± 0.011 μs 1 ± 0.043
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/LinModel 0.321 ± 0.01 μs 0.321 ± 0.001 μs 1 ± 0.031
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/NonLinModel 0.922 ± 0.011 μs 0.942 ± 0.01 μs 0.979 ± 0.016
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/LinModel 3.7 ± 0.039 μs 3.64 ± 0.029 μs 1.02 ± 0.013
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/NonLinModel 4.93 ± 0.04 μs 4.96 ± 0.031 μs 0.994 ± 0.01
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/LinModel 3.59 ± 0.05 μs 3.6 ± 0.021 μs 0.997 ± 0.015
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/NonLinModel 6.12 ± 0.06 μs 6.49 ± 0.06 μs 0.943 ± 0.013
time_to_load 6.1 ± 0.09 s 6.04 ± 0.049 s 1.01 ± 0.017
Memory benchmarks
main b267dff... main / b267dff...
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/DAQP/SingleShooting 0.0489 M allocs: 1.86 MB 0.0489 M allocs: 1.86 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/MultipleShooting 0.126 M allocs: 3.16 MB 0.126 M allocs: 3.16 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/SingleShooting 12.6 k allocs: 0.356 MB 12.6 k allocs: 0.356 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/DAQP/SingleShooting 0.0487 M allocs: 1.85 MB 0.0487 M allocs: 1.85 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/MultipleShooting 0.0879 M allocs: 2.23 MB 0.0879 M allocs: 2.23 MB 1
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/SingleShooting 12.5 k allocs: 0.35 MB 12.5 k allocs: 0.35 MB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/DAQP/SingleShooting 0.119 M allocs: 6.37 MB 0.119 M allocs: 6.37 MB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/MultipleShooting 4.76 M allocs: 0.257 GB 4.76 M allocs: 0.257 GB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/SingleShooting 0.148 M allocs: 8.23 MB 0.148 M allocs: 8.23 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting 0.369 M allocs: 25.6 MB 0.369 M allocs: 25.6 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting (Hessian) 2.2 M allocs: 0.244 GB 2.2 M allocs: 0.244 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/SingleShooting 0.306 M allocs: 0.0435 GB 0.306 M allocs: 0.0435 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation 2.17 M allocs: 0.212 GB 2.17 M allocs: 0.212 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation (Hessian) 2.17 M allocs: 0.212 GB 2.17 M allocs: 0.212 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting 0.316 M allocs: 22.1 MB 0.316 M allocs: 22.1 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting (Hessian) 0.741 M allocs: 0.0843 GB 0.741 M allocs: 0.0843 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/OrthogonalCollocation 1.36 M allocs: 0.122 GB 1.36 M allocs: 0.122 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/OrthogonalCollocation (Hessian) 1.36 M allocs: 0.122 GB 1.36 M allocs: 0.122 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting 0.0965 M allocs: 17.9 MB 0.0965 M allocs: 17.9 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting (Hessian) 0.0812 M allocs: 17 MB 0.0812 M allocs: 17 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation 0.314 M allocs: 21.9 MB 0.314 M allocs: 21.9 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation (Hessian) 0.757 M allocs: 0.0766 GB 0.757 M allocs: 0.0766 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting (Hessian) 0.0926 M allocs: 20 MB 0.0926 M allocs: 20 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Uno/MultipleShooting (Hessian) 0.339 M allocs: 0.036 GB 0.339 M allocs: 0.036 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting 0.277 M allocs: 19.1 MB 0.277 M allocs: 19.1 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (Hessian) 0.709 M allocs: 0.0739 GB 0.709 M allocs: 0.0739 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.296 M allocs: 28 MB 0.296 M allocs: 28 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/OrthogonalCollocation 1.4 M allocs: 0.126 GB 1.4 M allocs: 0.126 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/OrthogonalCollocation (Hessian) 5.71 M allocs: 0.694 GB 5.71 M allocs: 0.694 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting 0.0754 M allocs: 13.5 MB 0.0754 M allocs: 13.5 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting (Hessian) 0.0808 M allocs: 17 MB 0.0808 M allocs: 17 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation 0.276 M allocs: 19 MB 0.276 M allocs: 19 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (Hessian) 0.72 M allocs: 0.0657 GB 0.72 M allocs: 0.0657 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.295 M allocs: 28.1 MB 0.295 M allocs: 28.1 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/MultipleShooting (Hessian) 0.587 M allocs: 0.0728 GB 0.587 M allocs: 0.0728 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting (Hessian) 0.0927 M allocs: 20.1 MB 0.0927 M allocs: 20.1 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Uno/MultipleShooting (Hessian) 0.334 M allocs: 0.0325 GB 0.334 M allocs: 0.0325 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Current form 1.25 M allocs: 0.213 GB 1.25 M allocs: 0.213 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Prediction form 1.16 M allocs: 0.137 GB 1.16 M allocs: 0.137 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Current form 1.13 M allocs: 0.21 GB 1.13 M allocs: 0.21 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/MultipleShooting 3.05 M allocs: 0.175 GB 3.05 M allocs: 0.175 GB 1
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Prediction form 1.07 M allocs: 0.134 GB 1.07 M allocs: 0.134 GB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian) 0.0746 M allocs: 13 MB 0.0746 M allocs: 13 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian, MultipleShooting) 0.14 M allocs: 19.3 MB 0.157 M allocs: 20.8 MB 0.927
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian) 0.0747 M allocs: 13 MB 0.0747 M allocs: 13 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian, MultipleShooting) 0.135 M allocs: 18.5 MB 0.149 M allocs: 19.6 MB 0.944
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Current form (Hessian) 0.0946 M allocs: 16.6 MB 0.0946 M allocs: 16.6 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Prediction form (Hessian) 0.0932 M allocs: 16.1 MB 0.0932 M allocs: 16.1 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Uno/Current form (Hessian) 0.0326 M allocs: 5.07 MB 0.0326 M allocs: 5.07 MB 1
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Uno/Current form (Hessian, MultipleShooting) 0.0512 M allocs: 5.92 MB 0.065 M allocs: 7.05 MB 0.84
UNIT TESTS/PredictiveController/ExplicitMPC/moveinput! 0 allocs: 0 B 0 allocs: 0 B
UNIT TESTS/PredictiveController/LinMPC/getinfo! 0.326 k allocs: 15.6 kB 0.326 k allocs: 15.6 kB 1
UNIT TESTS/PredictiveController/LinMPC/moveinput!/MultipleShooting 1.62 k allocs: 0.0403 MB 1.62 k allocs: 0.0403 MB 1
UNIT TESTS/PredictiveController/LinMPC/moveinput!/SingleShooting 0.114 k allocs: 2.98 kB 0.114 k allocs: 2.98 kB 1
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/LinModel 0.408 k allocs: 0.0579 MB 0.408 k allocs: 0.0579 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/NonLinModel 0.571 k allocs: 0.077 MB 0.571 k allocs: 0.077 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/MultipleShooting 1.79 k allocs: 0.105 MB 1.79 k allocs: 0.105 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/SingleShooting 0.254 k allocs: 10.1 kB 0.254 k allocs: 10.1 kB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShooting 4.76 k allocs: 0.368 MB 4.76 k allocs: 0.368 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShootingHessian 5.34 k allocs: 0.423 MB 5.34 k allocs: 0.423 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/OrthogonalCollocation 9.59 k allocs: 0.611 MB 9.59 k allocs: 0.611 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/OrthogonalCollocationHessian 0.0459 M allocs: 4.44 MB 0.0459 M allocs: 4.44 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShooting 0.957 k allocs: 0.233 MB 0.957 k allocs: 0.233 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShootingHessian 0.957 k allocs: 0.233 MB 0.957 k allocs: 0.233 MB 1
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/TrapezoidalCollocation 3.42 k allocs: 0.241 MB 3.42 k allocs: 0.241 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.42 k allocs: 0.053 MB 1.42 k allocs: 0.053 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/NonLinModel 1.42 k allocs: 0.252 MB 1.42 k allocs: 0.252 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Constant arr. cov. 8.03 k allocs: 0.635 MB 8.03 k allocs: 0.635 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Current form 0.158 M allocs: 0.115 GB 0.158 M allocs: 0.115 GB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/MultipleShooting 17.3 k allocs: 0.904 MB 17.3 k allocs: 0.903 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Current form 1.04 k allocs: 27.8 kB 1.04 k allocs: 27.8 kB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/MultipleShooting 1.91 k allocs: 0.0478 MB 1.91 k allocs: 0.0478 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Prediction form 7.55 k allocs: 0.475 MB 7.55 k allocs: 0.475 MB 1
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Prediction form 1.04 k allocs: 27.8 kB 1.04 k allocs: 27.8 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

Copy link
Copy Markdown
Member Author

There are some very minor speed improvements on the inverted pendulum case study with MultipleShooting, good news.

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