File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const DEFAULT_NONLINMPC_JACDENSE = AutoForwardDiff()
55const DEFAULT_NONLINMPC_JACSPARSE = AutoSparse (
66 AutoForwardDiff ();
77 sparsity_detector= TracerSparsityDetector (),
8- coloring_algorithm= GreedyColoringAlgorithm (),
8+ coloring_algorithm= GreedyColoringAlgorithm (ALL_COLORING_ORDERS ),
99)
1010const DEFAULT_NONLINMPC_HESSIAN = DEFAULT_NONLINMPC_JACSPARSE
1111
@@ -291,10 +291,11 @@ NonLinMPC controller with a sample time Ts = 10.0 s:
291291 AutoSparse(
292292 AutoForwardDiff();
293293 sparsity_detector = TracerSparsityDetector(),
294- coloring_algorithm = GreedyColoringAlgorithm()
294+ coloring_algorithm = GreedyColoringAlgorithm(ALL_COLORING_ORDERS )
295295 )
296296 ```
297- This is also the sparse backend selected for the Hessian of the Lagrangian function if
297+ that is, it will test all coloring orders at preparation and keep the best. This is
298+ also the sparse backend selected for the Hessian of the Lagrangian function if
298299 `oracle=true` and `hessian=true`, which is the second exception. Second order
299300 derivatives are only supported with `oracle=true` option.
300301
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const DEFAULT_NONLINMHE_JACOBIAN = AutoForwardDiff()
55const DEFAULT_NONLINMHE_HESSIAN = AutoSparse (
66 AutoForwardDiff ();
77 sparsity_detector= TracerSparsityDetector (),
8- coloring_algorithm= GreedyColoringAlgorithm (),
8+ coloring_algorithm= GreedyColoringAlgorithm (ALL_COLORING_ORDERS ),
99)
1010
1111@doc raw """
@@ -382,9 +382,11 @@ MovingHorizonEstimator estimator with a sample time Ts = 10.0 s:
382382 AutoSparse(
383383 AutoForwardDiff();
384384 sparsity_detector = TracerSparsityDetector(),
385- coloring_algorithm = GreedyColoringAlgorithm()
385+ coloring_algorithm = GreedyColoringAlgorithm(ALL_COLORING_ORDERS )
386386 )
387387 ```
388+ that is, it will test all coloring orders at preparation and keep the best.
389+
388390 The slack variable ``ε`` relaxes the constraints if enabled, see [`setconstraint!`](@ref).
389391 It is disabled by default for the MHE (from `Cwt=Inf`) but it should be activated for
390392 problems with two or more types of bounds, to ensure feasibility (e.g. on the estimated
Original file line number Diff line number Diff line change @@ -6,6 +6,15 @@ const DEFAULT_LWT = 0.0
66const DEFAULT_CWT = 1e5
77const DEFAULT_EWT = 0.0
88
9+ " All deterministic algorithms for matrix coloring order in `SparseMatrixColoring.jl`."
10+ const ALL_COLORING_ORDERS = (
11+ NaturalOrder (),
12+ LargestFirst (),
13+ SmallestLast (),
14+ IncidenceDegree (),
15+ DynamicLargestFirst (),
16+ )
17+
918" Termination status that means 'no solution available'."
1019const ERROR_STATUSES = (
1120 JuMP. INFEASIBLE, JuMP. DUAL_INFEASIBLE, JuMP. LOCALLY_INFEASIBLE,
You can’t perform that action at this time.
0 commit comments