Skip to content

Commit b4ad881

Browse files
authored
Merge pull request #285 from JuliaControl/default_postprocess
changed: sparse backends default to post-processing
2 parents 70ae5d1 + a5f25e7 commit b4ad881

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ModelPredictiveControl"
22
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
3-
version = "1.13.1"
3+
version = "1.13.2"
44
authors = ["Francis Gagnon"]
55

66
[deps]
@@ -24,7 +24,7 @@ SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35"
2424
[compat]
2525
ControlSystemsBase = "1.18.2"
2626
DAQP = "0.6, 0.7.1"
27-
DifferentiationInterface = "0.6.45, 0.7"
27+
DifferentiationInterface = "0.7.11"
2828
Documenter = "1"
2929
FiniteDiff = "2"
3030
ForwardDiff = "0.10, 1"

src/controller/nonlinmpc.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const DEFAULT_NONLINMPC_JACDENSE = AutoForwardDiff()
55
const DEFAULT_NONLINMPC_JACSPARSE = AutoSparse(
66
AutoForwardDiff();
77
sparsity_detector=TracerSparsityDetector(),
8-
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS),
8+
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS, postprocessing=true),
99
)
1010
const DEFAULT_NONLINMPC_HESSIAN = DEFAULT_NONLINMPC_JACSPARSE
1111

@@ -291,13 +291,16 @@ 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(
295+
(
295296
NaturalOrder(),
296297
LargestFirst(),
297298
SmallestLast(),
298299
IncidenceDegree(),
299300
DynamicLargestFirst()
300-
))
301+
),
302+
postprocessing = true
303+
)
301304
)
302305
```
303306
that is, it will test many coloring orders at preparation and keep the best. This is

src/estimator/mhe/construct.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const DEFAULT_NONLINMHE_JACOBIAN = AutoForwardDiff()
55
const DEFAULT_NONLINMHE_HESSIAN = AutoSparse(
66
AutoForwardDiff();
77
sparsity_detector=TracerSparsityDetector(),
8-
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS),
8+
coloring_algorithm=GreedyColoringAlgorithm(ALL_COLORING_ORDERS, postprocessing=true),
99
)
1010

1111
@doc raw"""
@@ -382,13 +382,16 @@ 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(
386+
(
386387
NaturalOrder(),
387388
LargestFirst(),
388389
SmallestLast(),
389390
IncidenceDegree(),
390391
DynamicLargestFirst()
391-
))
392+
),
393+
postprocessing = true
394+
)
392395
)
393396
```
394397
that is, it will test many coloring orders at preparation and keep the best.

0 commit comments

Comments
 (0)