Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ModelPredictiveControl"
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
version = "1.13.1"
version = "1.13.2"
authors = ["Francis Gagnon"]

[deps]
Expand All @@ -24,7 +24,7 @@ SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
[compat]
ControlSystemsBase = "1.18.2"
DAQP = "0.6, 0.7.1"
DifferentiationInterface = "0.6.45, 0.7"
DifferentiationInterface = "0.7.11"
Documenter = "1"
FiniteDiff = "2"
ForwardDiff = "0.10, 1"
Expand Down
9 changes: 6 additions & 3 deletions src/controller/nonlinmpc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const DEFAULT_NONLINMPC_JACDENSE = AutoForwardDiff()
const DEFAULT_NONLINMPC_JACSPARSE = AutoSparse(
AutoForwardDiff();
sparsity_detector=TracerSparsityDetector(),
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS),
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS, postprocessing=true),
)
const DEFAULT_NONLINMPC_HESSIAN = DEFAULT_NONLINMPC_JACSPARSE

Expand Down Expand Up @@ -291,13 +291,16 @@ NonLinMPC controller with a sample time Ts = 10.0 s:
AutoSparse(
AutoForwardDiff();
sparsity_detector = TracerSparsityDetector(),
coloring_algorithm = GreedyColoringAlgorithm((
coloring_algorithm = GreedyColoringAlgorithm(
(
NaturalOrder(),
LargestFirst(),
SmallestLast(),
IncidenceDegree(),
DynamicLargestFirst()
))
),
postprocessing = true
)
)
```
that is, it will test many coloring orders at preparation and keep the best. This is
Expand Down
9 changes: 6 additions & 3 deletions src/estimator/mhe/construct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const DEFAULT_NONLINMHE_JACOBIAN = AutoForwardDiff()
const DEFAULT_NONLINMHE_HESSIAN = AutoSparse(
AutoForwardDiff();
sparsity_detector=TracerSparsityDetector(),
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS),
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS, postprocessing=true),
)

@doc raw"""
Expand Down Expand Up @@ -382,13 +382,16 @@ MovingHorizonEstimator estimator with a sample time Ts = 10.0 s:
AutoSparse(
AutoForwardDiff();
sparsity_detector = TracerSparsityDetector(),
coloring_algorithm = GreedyColoringAlgorithm((
coloring_algorithm = GreedyColoringAlgorithm(
(
NaturalOrder(),
LargestFirst(),
SmallestLast(),
IncidenceDegree(),
DynamicLargestFirst()
))
),
postprocessing = true
)
)
```
that is, it will test many coloring orders at preparation and keep the best.
Expand Down