@@ -438,3 +438,72 @@ CASE_ESTIM["Pendulum"]["MovingHorizonEstimator"]["Uno"]["Current form (Hessian,
438438 sim! ($ mhe_pendulum_uno_currhms, $ N, $ u; plant= $ plant, x_0= $ x_0, x̂_0= $ x̂_0, progress= false ),
439439 samples= samples, evals= evals, seconds= seconds, setup= GC. gc ()
440440 )
441+
442+ # # ----------------- Case study: pH neutralization reactor --------------------------------
443+ model, p = ph_model, ph_p
444+ nint_ym= 0 ; nint_u= 0 ;
445+ He = 8 ;
446+ σQ = [0.5e-3 , 0.5e-3 , 0.9e-3 ]; σR= [0.05 ]; σP_0 = [0.05 , 0.05 , 1e-3 ]
447+
448+ x_0, x̂_0 = ph_x_0, [ph_x_0[1 : 2 ]; ph_x_0[3 ]+ 0.1 ]
449+ u, d = [10.0 ], [10.0 ]
450+ N = 10 ;
451+
452+ optim = JuMP. Model (optimizer_with_attributes (Ipopt. Optimizer," sb" => " yes" ), add_bridges= false )
453+ transcription = TrapezoidalCollocation (0 )
454+ hessian = true
455+ mhe_ph_ipopt_tch = MovingHorizonEstimator (
456+ model; nint_ym, nint_u, He, hessian, σQ, σR, σP_0, optim, transcription
457+ )
458+ mhe_ph_ipopt_tch = setconstraint! (mhe_ph_ipopt_tch, x̂min= [0 , 0 , 0 ])
459+ JuMP. unset_time_limit_sec (mhe_ph_ipopt_tch. optim)
460+
461+ optim = JuMP. Model (optimizer_with_attributes (Ipopt. Optimizer," sb" => " yes" ), add_bridges= false )
462+ transcription = OrthogonalCollocation (0 , 2 , roots= :gaussradau )
463+ hessian = true
464+ mhe_ph_ipopt_och = MovingHorizonEstimator (
465+ model; nint_ym, nint_u, He, hessian, σQ, σR, σP_0, optim, transcription
466+ )
467+ mhe_ph_ipopt_och = setconstraint! (mhe_ph_ipopt_och, x̂min= [0 , 0 , 0 ])
468+ JuMP. unset_time_limit_sec (mhe_ph_ipopt_och. optim)
469+
470+ optim = JuMP. Model (()-> UnoSolver. Optimizer (preset= " funnelsqp" ), add_bridges= false )
471+ transcription = TrapezoidalCollocation (0 )
472+ hessian = true
473+ mhe_ph_uno_tch = MovingHorizonEstimator (
474+ model; nint_ym, nint_u, He, hessian, σQ, σR, σP_0, optim, transcription
475+ )
476+ mhe_ph_uno_tch = setconstraint! (mhe_ph_uno_tch, x̂min= [0 , 0 , 0 ])
477+ JuMP. unset_time_limit_sec (mhe_ph_uno_tch. optim)
478+
479+ optim = JuMP. Model (()-> UnoSolver. Optimizer (preset= " funnelsqp" ), add_bridges= false )
480+ transcription = OrthogonalCollocation (0 , 2 , roots= :gaussradau )
481+ hessian = true
482+ mhe_ph_uno_och = MovingHorizonEstimator (
483+ model; nint_ym, nint_u, He, hessian, σQ, σR, σP_0, optim, transcription
484+ )
485+ mhe_ph_uno_och = setconstraint! (mhe_ph_uno_och, x̂min= [0 , 0 , 0 ])
486+ JuMP. unset_time_limit_sec (mhe_ph_uno_och. optim)
487+
488+ samples, evals, seconds = 25 , 1 , 15 * 60
489+ CASE_ESTIM[" pH neutral." ][" MovingHorizonEstimator" ][" Ipopt" ][" TrapezoidalCollocation (Hessian)" ] =
490+ @benchmarkable (
491+ sim! ($ mhe_ph_ipopt_tch, $ N, $ u; x_0= $ x_0, x̂_0= $ x̂_0, progress= false ),
492+ samples= samples, evals= evals, seconds= seconds, setup= GC. gc ()
493+ )
494+ CASE_ESTIM[" pH neutral." ][" MovingHorizonEstimator" ][" Ipopt" ][" OrthogonalCollocation (Hessian)" ] =
495+ @benchmarkable (
496+ sim! ($ mhe_ph_ipopt_och, $ N, $ u; x_0= $ x_0, x̂_0= $ x̂_0, progress= false ),
497+ samples= samples, evals= evals, seconds= seconds, setup= GC. gc ()
498+ )
499+ CASE_ESTIM[" pH neutral." ][" MovingHorizonEstimator" ][" Uno" ][" TrapezoidalCollocation (Hessian)" ] =
500+ @benchmarkable (
501+ sim! ($ mhe_ph_uno_tch, $ N, $ u; x_0= $ x_0, x̂_0= $ x̂_0, progress= false ),
502+ samples= samples, evals= evals, seconds= seconds, setup= GC. gc ()
503+ )
504+ CASE_ESTIM[" pH neutral." ][" MovingHorizonEstimator" ][" Uno" ][" OrthogonalCollocation (Hessian)" ] =
505+ @benchmarkable (
506+ sim! ($ mhe_ph_uno_och, $ N, $ u; x_0= $ x_0, x̂_0= $ x̂_0, progress= false ),
507+ samples= samples, evals= evals, seconds= seconds, setup= GC. gc ()
508+ )
509+
0 commit comments