Skip to content

Conversation

@franckgaga
Copy link
Member

@franckgaga franckgaga commented Nov 28, 2025

The info dictionary now includes the following fields in both methods:

  • :∇J or :nablaJ : the gradient of the objective function $\mathbf{\nabla} J$
  • :∇²J or :nabla2J : the Hessian of the objective function $\mathbf{\nabla^2}J$
  • :∇g or :nablag : the Jacobian of the inequality constraint $\mathbf{\nabla g}$
  • :∇²ℓg or :nabla2lg : the Hessian of the inequality Lagrangian $\mathbf{\nabla^2}\ell_{\mathbf{g}}$
  • :∇geq or :nablageq : the Jacobian of the equality constraint $\mathbf{\nabla g_{eq}}$
  • :∇²ℓgeq or :nabla2lgeq : the Hessian of the equality Lagrangian $\mathbf{\nabla^2}\ell_{\mathbf{g_{eq}}}$

Note that Hessian of Lagrangians are not fully supported yet. Their nonzero coefficients are
random values for now. See Oscar's issue below to follow the updates about the required feature in MathOptInterface.jl.

I don't use the DifferentiationInterface.jl preparation mechanism, since getinfo is only meant for troubleshooting and it's already a relatively expensive function that allocates the arrays at each call.

@franckgaga
Copy link
Member Author

franckgaga commented Nov 28, 2025

Quick question @odow. If I want to retrieve the value of the $\mu$ vector of a nonlinear constraint defined with a VectorNonlinearOracle after solving, should I use JuMP.dual or JuMP.shadow_price ? I need this value to compute the Hessian of the two Langrangian defined above at the solution.

edit: also, for Ipopt, why both functions return a vector with nx elements, the number of decision variable, instead of ng or ngeq, the number of inequality and equality constraints? My understanding is that it should be the Lagrange multipliers, no ?

@franckgaga
Copy link
Member Author

franckgaga commented Nov 30, 2025

To be a bit more explicit, here's a simple example, that is, the first example of jump-dev/Ipopt.jl#468 (comment):

using JuMP, Ipopt, MathOptInterface
set = MathOptInterface.VectorNonlinearOracle(;
    dimension = 2,
    l = [-Inf],
    u = [1.0],
    eval_f = (ret, x) -> (ret[1] = x[1]^2 + x[2]^2),
    jacobian_structure = [(1, 1), (1, 2)],
    eval_jacobian = (ret, x) -> ret .= 2.0 .* x,
    hessian_lagrangian_structure = [(1, 1), (2, 2)],
    eval_hessian_lagrangian = (ret, x, u) -> ret .= 2.0 .* u[1],
)
model = Model(Ipopt.Optimizer)
set_silent(model)
@variable(model, x)
@variable(model, y)
@objective(model, Max, x + y)
@constraint(model, c, [x, y] in set)
optimize!(model)
@show value(x), value(y)
@show dual(c)

why does the dual variable vector has two elements instead of one:

(value(x), value(y)) = (0.707106783471979, 0.707106783471979)
dual(c) = [-0.9999999949684055, -0.9999999949684055]

Isn't supposed to be the same thing as the Lagrange multiplier (the u argument of eval_hessian_lagrangian function) ? There is only one constraint in the model above.

Thanks.

@franckgaga
Copy link
Member Author

I asked the question on discourse, since it may be usefull for others. You can answer me here: https://discourse.julialang.org/t/lagrange-multipliers-of-a-vectornonlinearoracle-after-solve/134236

@odow
Copy link
Contributor

odow commented Nov 30, 2025

jump-dev/MathOptInterface.jl#2887

@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.54%. Comparing base (2730e8b) to head (78886db).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #290      +/-   ##
==========================================
+ Coverage   98.50%   98.54%   +0.03%     
==========================================
  Files          28       28              
  Lines        4831     4964     +133     
==========================================
+ Hits         4759     4892     +133     
  Misses         72       72              

☔ 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.

The sparsity structure is still a useful information IMO, so it is worth it to output the matrices anyway with this warning
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Benchmark Results (Julia v1)

Time benchmarks
main 78886db... main / 78886db...
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/DAQP/SingleShooting 5.28 ± 0.45 ms 5.28 ± 0.56 ms 1 ± 0.14
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/MultipleShooting 0.318 ± 0.004 s 0.316 ± 0.0049 s 1.01 ± 0.02
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/Ipopt/SingleShooting 0.228 ± 0.0026 s 0.225 ± 0.0094 s 1.01 ± 0.044
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/MultipleShooting 9.02 ± 0.45 ms 9.88 ± 0.4 ms 0.912 ± 0.058
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/OSQP/SingleShooting 1.7 ± 0.074 ms 1.75 ± 0.032 ms 0.971 ± 0.046
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/DAQP/SingleShooting 5.22 ± 0.49 ms 5.26 ± 0.5 ms 0.992 ± 0.13
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/MultipleShooting 0.281 ± 0.003 s 0.275 ± 0.0032 s 1.02 ± 0.016
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/Ipopt/SingleShooting 0.242 ± 0.0011 s 0.229 ± 0.0033 s 1.06 ± 0.016
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/MultipleShooting 6.21 ± 0.38 ms 6.7 ± 0.18 ms 0.926 ± 0.062
CASE STUDIES/PredictiveController/CSTR/LinMPC/Without feedforward/OSQP/SingleShooting 1.78 ± 0.073 ms 1.84 ± 0.043 ms 0.966 ± 0.045
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/DAQP/SingleShooting 9.43 ± 1.4 ms 9.64 ± 1.5 ms 0.978 ± 0.21
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/MultipleShooting 0.313 ± 0.045 s 0.31 ± 0.069 s 1.01 ± 0.27
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/SingleShooting 0.16 ± 0.0025 s 0.163 ± 0.0059 s 0.98 ± 0.039
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/MultipleShooting 0.107 ± 0.017 s 0.103 ± 0.017 s 1.04 ± 0.23
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/SingleShooting 12.2 ± 1.4 ms 12.6 ± 1.6 ms 0.963 ± 0.17
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting 0.695 ± 0.028 s 0.693 ± 0.032 s 1 ± 0.061
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/MultipleShooting (Hessian) 0.682 ± 0.013 s 0.662 ± 0.053 s 1.03 ± 0.084
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/SingleShooting 1.74 ± 0.052 s 1.74 ± 0.11 s 1 ± 0.071
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation 0.523 ± 0.043 s 0.498 ± 0.062 s 1.05 ± 0.16
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation (Hessian) 0.517 ± 0.042 s 0.496 ± 0.04 s 1.04 ± 0.12
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting 0.364 ± 0.0064 s 0.358 ± 0.0056 s 1.02 ± 0.024
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/MultipleShooting (Hessian) 0.409 ± 0.031 s 0.386 ± 0.017 s 1.06 ± 0.093
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting 0.501 ± 0.0062 s 0.492 ± 0.011 s 1.02 ± 0.025
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/SingleShooting (Hessian) 0.17 ± 0.0031 s 0.167 ± 0.0048 s 1.02 ± 0.034
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation 0.334 ± 0.009 s 0.331 ± 0.012 s 1.01 ± 0.047
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/Ipopt/TrapezoidalCollocation (Hessian) 0.443 ± 0.02 s 0.435 ± 0.057 s 1.02 ± 0.14
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting 0.145 ± 0.0026 s 0.152 ± 0.017 s 0.951 ± 0.11
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting 0.347 ± 0.011 s 0.343 ± 0.0038 s 1.01 ± 0.034
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (Hessian) 0.42 ± 0.026 s 0.395 ± 0.045 s 1.06 ± 0.14
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.375 ± 0.016 s 0.367 ± 0.013 s 1.02 ± 0.056
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting 0.494 ± 0.0096 s 0.488 ± 0.0018 s 1.01 ± 0.02
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/SingleShooting (Hessian) 0.171 ± 0.0048 s 0.168 ± 0.0036 s 1.02 ± 0.036
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation 0.328 ± 0.0066 s 0.323 ± 0.0063 s 1.01 ± 0.028
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (Hessian) 0.304 ± 0.038 s 0.297 ± 0.012 s 1.02 ± 0.13
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.358 ± 0.019 s 0.368 ± 0.017 s 0.974 ± 0.068
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting 0.124 ± 0.00098 s 0.127 ± 0.013 s 0.976 ± 0.099
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Uno/MultipleShooting (Hessian) 0.213 ± 0.02 s 0.193 ± 0.036 s 1.1 ± 0.23
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Current form 0.038 ± 0.00094 s 0.0381 ± 0.0015 s 0.998 ± 0.046
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/DAQP/Prediction form 0.0329 ± 0.0081 s 0.0322 ± 0.0073 s 1.02 ± 0.34
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Current form 0.171 ± 0.036 s 0.183 ± 0.037 s 0.937 ± 0.27
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/Ipopt/Prediction form 0.16 ± 0.026 s 0.155 ± 0.028 s 1.03 ± 0.25
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Current form 0.0337 ± 0.003 s 0.0363 ± 0.0047 s 0.927 ± 0.15
CASE STUDIES/StateEstimator/CSTR/MovingHorizonEstimator/OSQP/Prediction form 27.6 ± 6.4 ms 26.8 ± 5.7 ms 1.03 ± 0.32
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form 0.0855 ± 0.0064 s 0.0808 ± 0.00087 s 1.06 ± 0.08
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Current form (Hessian) 0.0817 ± 0.0009 s 0.0826 ± 0.0059 s 0.988 ± 0.072
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form 0.0681 ± 0.0037 s 0.0636 ± 0.0017 s 1.07 ± 0.064
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/Ipopt/Prediction form (Hessian) 0.0876 ± 0.0048 s 0.0829 ± 0.0019 s 1.06 ± 0.063
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Current form 2.48 ± 0.057 s 2.37 ± 0.038 s 1.05 ± 0.029
CASE STUDIES/StateEstimator/Pendulum/MovingHorizonEstimator/MadNLP/Prediction form 1.49 ± 0.04 s 1.41 ± 0.014 s 1.05 ± 0.03
UNIT TESTS/PredictiveController/ExplicitMPC/moveinput! 4.2 ± 0.03 μs 4 ± 0.061 μs 1.05 ± 0.018
UNIT TESTS/PredictiveController/LinMPC/getinfo! 0.11 ± 0.0027 ms 0.109 ± 0.0028 ms 1.01 ± 0.036
UNIT TESTS/PredictiveController/LinMPC/moveinput!/MultipleShooting 0.11 ± 0.0073 ms 0.106 ± 0.0013 ms 1.04 ± 0.07
UNIT TESTS/PredictiveController/LinMPC/moveinput!/SingleShooting 15.3 ± 0.38 μs 15.2 ± 0.32 μs 1 ± 0.033
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/LinModel 0.146 ± 0.01 ms 0.198 ± 0.01 ms 0.736 ± 0.064
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/NonLinModel 0.15 ± 0.0088 ms 0.233 ± 0.018 ms 0.642 ± 0.063
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/MultipleShooting 2.56 ± 0.15 ms 2.54 ± 0.22 ms 1.01 ± 0.11
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/LinModel/SingleShooting 1.71 ± 0.037 ms 1.7 ± 0.064 ms 1.01 ± 0.044
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShooting 3.08 ± 0.1 ms 3.11 ± 0.18 ms 0.992 ± 0.067
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/MultipleShootingHessian 3.09 ± 0.11 ms 3.09 ± 0.1 ms 1 ± 0.05
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShooting 1.95 ± 0.21 ms 1.73 ± 0.046 ms 1.13 ± 0.12
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/SingleShootingHessian 1.82 ± 0.11 ms 1.72 ± 0.039 ms 1.06 ± 0.07
UNIT TESTS/PredictiveController/NonLinMPC/moveinput!/NonLinModel/TrapezoidalCollocation 2.19 ± 0.08 ms 2.16 ± 0.063 ms 1.02 ± 0.048
UNIT TESTS/SimModel/LinModel/evaloutput 0.141 ± 0.01 μs 0.14 ± 0.001 μs 1.01 ± 0.072
UNIT TESTS/SimModel/LinModel/updatestate! 0.221 ± 0.01 μs 0.201 ± 0.01 μs 1.1 ± 0.074
UNIT TESTS/SimModel/NonLinModel/evaloutput 0.421 ± 0.001 μs 0.421 ± 0.001 μs 1 ± 0.0034
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.481 ± 0 μs 0.481 ± 0 μs 1 ± 0
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/LinModel 0.551 ± 0.01 μs 0.541 ± 0.01 μs 1.02 ± 0.026
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/evaloutput/NonLinModel 1.81 ± 0.02 μs 1.81 ± 0.019 μs 1 ± 0.015
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/preparestate!/LinModel 0.29 ± 0.01 μs 0.271 ± 0.01 μs 1.07 ± 0.054
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.05 μs 3.98 ± 0.06 μs 0.987 ± 0.019
UNIT TESTS/StateEstimator/ExtendedKalmanFilter/updatestate!/NonLinModel 8.96 ± 0.09 μs 8.97 ± 0.15 μs 0.999 ± 0.019
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.591 ± 0 μs 0.983 ± 0.017
UNIT TESTS/StateEstimator/InternalModel/preparestate!/LinModel 0.291 ± 0.01 μs 0.28 ± 0.01 μs 1.04 ± 0.052
UNIT TESTS/StateEstimator/InternalModel/preparestate!/NonLinModel 0.741 ± 0.01 μs 0.732 ± 0.01 μs 1.01 ± 0.019
UNIT TESTS/StateEstimator/InternalModel/updatestate!/LinModel 0.411 ± 0.01 μs 0.421 ± 0.01 μs 0.976 ± 0.033
UNIT TESTS/StateEstimator/InternalModel/updatestate!/NonLinModel 0.912 ± 0.009 μs 0.922 ± 0.001 μs 0.989 ± 0.0098
UNIT TESTS/StateEstimator/KalmanFilter/evaloutput 0.261 ± 0.01 μs 0.26 ± 0.001 μs 1 ± 0.039
UNIT TESTS/StateEstimator/KalmanFilter/preparestate! 0.14 ± 0.009 μs 0.131 ± 0.01 μs 1.07 ± 0.11
UNIT TESTS/StateEstimator/KalmanFilter/updatestate! 2.52 ± 0.04 μs 2.55 ± 0.03 μs 0.989 ± 0.019
UNIT TESTS/StateEstimator/Luenberger/evaloutput 0.241 ± 0.01 μs 0.24 ± 0.001 μs 1 ± 0.042
UNIT TESTS/StateEstimator/Luenberger/preparestate! 0.26 ± 0.01 μs 0.261 ± 0.01 μs 0.996 ± 0.054
UNIT TESTS/StateEstimator/Luenberger/updatestate! 0.361 ± 0.001 μs 0.361 ± 0.01 μs 1 ± 0.028
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/LinModel 0.176 ± 0.013 ms 0.177 ± 0.014 ms 0.993 ± 0.11
UNIT TESTS/StateEstimator/MovingHorizonEstimator/getinfo!/NonLinModel 0.184 ± 0.018 ms 0.359 ± 0.019 ms 0.512 ± 0.058
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Current form 3.81 ± 0.31 ms 3.78 ± 0.32 ms 1.01 ± 0.12
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Prediction form 0.481 ± 0 μs 0.481 ± 0 μs 1 ± 0
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Current form 0.341 ± 0.025 ms 0.341 ± 0.02 ms 1 ± 0.094
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/NonLinModel/Prediction form 1.33 ± 0.01 μs 1.33 ± 0.01 μs 1 ± 0.011
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Current form 16.8 ± 8 μs 6.48 ± 1.5 μs 2.59 ± 1.4
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/LinModel/Prediction form 3.21 ± 0.2 ms 3.05 ± 0.11 ms 1.05 ± 0.075
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Current form 17.5 ± 0.9 μs 17 ± 0.38 μs 1.03 ± 0.058
UNIT TESTS/StateEstimator/MovingHorizonEstimator/updatestate!/NonLinModel/Prediction form 0.363 ± 0.024 ms 0.355 ± 0.018 ms 1.02 ± 0.085
UNIT TESTS/StateEstimator/SteadyKalmanFilter/evaloutput 0.271 ± 0.01 μs 0.261 ± 0.01 μs 1.04 ± 0.055
UNIT TESTS/StateEstimator/SteadyKalmanFilter/preparestate! 0.29 ± 0.01 μs 0.29 ± 0.01 μs 1 ± 0.049
UNIT TESTS/StateEstimator/SteadyKalmanFilter/updatestate! 0.371 ± 0.01 μs 0.371 ± 0.01 μs 1 ± 0.038
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/LinModel 0.32 ± 0.01 μs 0.31 ± 0.01 μs 1.03 ± 0.046
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/evaloutput/NonLinModel 0.911 ± 0.01 μs 0.921 ± 0.01 μs 0.989 ± 0.015
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/LinModel 3.7 ± 0.031 μs 3.99 ± 0.039 μs 0.927 ± 0.012
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/preparestate!/NonLinModel 5.18 ± 0.031 μs 4.96 ± 0.04 μs 1.04 ± 0.01
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/LinModel 3.49 ± 0.04 μs 3.53 ± 0.031 μs 0.989 ± 0.014
UNIT TESTS/StateEstimator/UnscentedKalmanFilter/updatestate!/NonLinModel 6.31 ± 0.05 μs 6.39 ± 0.061 μs 0.987 ± 0.012
time_to_load 3.57 ± 0.037 s 5.82 ± 0.098 s 0.613 ± 0.012
Memory benchmarks
main 78886db... main / 78886db...
CASE STUDIES/PredictiveController/CSTR/LinMPC/With feedforward/DAQP/SingleShooting 0.0424 M allocs: 1.7 MB 0.0424 M allocs: 1.7 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.0422 M allocs: 1.7 MB 0.0422 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.107 M allocs: 5.91 MB 0.107 M allocs: 5.91 MB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/MultipleShooting 4.65 M allocs: 0.25 GB 4.65 M allocs: 0.25 GB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/Ipopt/SingleShooting 0.108 M allocs: 6.34 MB 0.108 M allocs: 6.34 MB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/MultipleShooting 4.68 M allocs: 0.254 GB 4.68 M allocs: 0.254 GB 1
CASE STUDIES/PredictiveController/Pendulum/LinMPC/Successive linearization/OSQP/SingleShooting 0.119 M allocs: 7.46 MB 0.119 M allocs: 7.46 MB 1
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.0789 GB 1
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.0789 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Custom constraints/Ipopt/TrapezoidalCollocation (Hessian) 1.18 M allocs: 0.0789 GB 1.18 M allocs: 0.0789 GB 1
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.552 M allocs: 0.0505 GB 0.552 M allocs: 0.0505 GB 1
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: 4.95 MB 1
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.18 M allocs: 0.0881 GB 1.18 M allocs: 0.0881 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Economic/MadNLP/SingleShooting 0.297 M allocs: 0.0649 GB 0.297 M allocs: 0.0649 GB 1
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.0541 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/MultipleShooting (threaded) 0.244 M allocs: 20.1 MB 0.244 M allocs: 20.1 MB 1
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: 4.91 MB 1
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.0547 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Ipopt/TrapezoidalCollocation (threaded) 0.335 M allocs: 24.4 MB 0.335 M allocs: 24.4 MB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/MadNLP/SingleShooting 0.255 M allocs: 0.056 GB 0.255 M allocs: 0.056 GB 1
CASE STUDIES/PredictiveController/Pendulum/NonLinMPC/Noneconomic/Uno/MultipleShooting (Hessian) 1.4 M allocs: 0.0864 GB 1.4 M allocs: 0.0864 GB 1
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.631 M allocs: 0.0782 GB 0.977
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.406 k allocs: 18.2 kB 0.559 k allocs: 0.0578 MB 0.308
UNIT TESTS/PredictiveController/NonLinMPC/getinfo!/NonLinModel 0.406 k allocs: 18.2 kB 0.602 k allocs: 0.0768 MB 0.232
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.1 k allocs: 0.041 MB 1.24 k allocs: 0.203 MB 0.202
UNIT TESTS/StateEstimator/MovingHorizonEstimator/preparestate!/LinModel/Current form 0.0754 M allocs: 14.6 MB 0.0754 M allocs: 14.6 MB 0.999
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
Copy link
Member Author

There is an impact on getinfo performances, as expected, but nothing terrible (~ 0.6-0.75 times slower). It is still quite fast in term of running time, and since getinfo is only meant for troubleshooting, I'm comfortable with this regression.

@franckgaga franckgaga merged commit bba9ce7 into main Dec 3, 2025
5 checks passed
@franckgaga franckgaga deleted the getinfo_deriv branch December 3, 2025 01:29
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.

4 participants