You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/controller/nonlinmpc.jl
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ struct NonLinMPC{
68
68
estim::SE, Hp, Hc, nb, weights::CW,
69
69
JE::JEfunc, gc!::GCfunc, nc, p::PT,
70
70
transcription::TM, optim::JM,
71
-
gradient::GB, jacobian::JB, oracle
71
+
gradient::GB, jacobian::JB, hessian::HB, oracle
72
72
) where {
73
73
NT<:Real,
74
74
SE<:StateEstimator,
@@ -77,6 +77,7 @@ struct NonLinMPC{
77
77
JM<:JuMP.GenericModel,
78
78
GB<:AbstractADType,
79
79
JB<:AbstractADType,
80
+
HB<:Union{AbstractADType, Nothing},
80
81
PT<:Any,
81
82
JEfunc<:Function,
82
83
GCfunc<:Function,
@@ -218,6 +219,8 @@ This controller allocates memory at each time step for the optimization.
218
219
function, see [`DifferentiationInterface` doc](@extref DifferentiationInterface List).
219
220
- `jacobian=default_jacobian(transcription)` : an `AbstractADType` backend for the Jacobian
220
221
of the nonlinear constraints, see `gradient` above for the options (default in Extended Help).
222
+
- `hessian=false` : an `AbstractADType` backend for the Hessian of the Lagrangian, see
223
+
`gradient` above for the options (`false` to skip it and use `optim` approximation).
221
224
- `oracle=JuMP.solver_name(optim)=="Ipopt"`: use the efficient [`VectorNonlinearOracle`](@extref MathOptInterface MathOptInterface.VectorNonlinearOracle)
222
225
for the nonlinear constraints (not supported by most optimizers for now).
223
226
- additional keyword arguments are passed to [`UnscentedKalmanFilter`](@ref) constructor
0 commit comments