Skip to content

Commit 51c8080

Browse files
committed
changed: hessian=true to dense ForwardDiff for MovingHorizonEstimator
1 parent 5628046 commit 51c8080

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

src/estimator/mhe/construct.jl

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ const DEFAULT_LINMHE_OPTIMIZER = OSQP.MathOptInterfaceOSQP.Optimizer
22
const DEFAULT_NONLINMHE_OPTIMIZER = optimizer_with_attributes(Ipopt.Optimizer,"sb"=>"yes")
33
const DEFAULT_NONLINMHE_GRADIENT = AutoForwardDiff()
44
const DEFAULT_NONLINMHE_JACOBIAN = AutoForwardDiff()
5-
const DEFAULT_NONLINMHE_HESSIAN = AutoSparse(
6-
AutoForwardDiff();
7-
sparsity_detector=TracerSparsityDetector(),
8-
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS, postprocessing=true),
9-
)
5+
const DEFAULT_NONLINMHE_HESSIAN = AutoForwardDiff()
106

117
@doc raw"""
128
Include all the data for the constraints of [`MovingHorizonEstimator`](@ref).
@@ -449,27 +445,6 @@ MovingHorizonEstimator estimator with a sample time Ts = 10.0 s:
449445
for common mistakes when writing these functions. Also, an [`UnscentedKalmanFilter`](@ref)
450446
estimates the arrival covariance by default.
451447
452-
One exception about AD: the selected backend for the Hessian of the Lagrangian function
453-
with `hessian=true` options is sparse:
454-
```julia
455-
AutoSparse(
456-
AutoForwardDiff();
457-
sparsity_detector = TracerSparsityDetector(),
458-
coloring_algorithm = GreedyColoringAlgorithm(
459-
(
460-
NaturalOrder(),
461-
LargestFirst(),
462-
SmallestLast(),
463-
IncidenceDegree(),
464-
DynamicLargestFirst(),
465-
RandomOrder(StableRNG(0), 0)
466-
),
467-
postprocessing = true
468-
)
469-
)
470-
```
471-
that is, it will test many coloring orders at preparation and keep the best.
472-
473448
Note that if `Cwt≠Inf`, the attribute `nlp_scaling_max_gradient` of `Ipopt` is set to
474449
`10/Cwt` (if not already set), to scale the small values of ``ε``. Use the second
475450
constructor to specify the arrival covariance estimation method.

0 commit comments

Comments
 (0)