Skip to content

Commit a435ff4

Browse files
authored
Merge pull request #155 from JuliaControl/multiple_shooting
added: 🎉 multiple shooting transcription for `LinMPC` and `NonLinMPC` 🎉
2 parents 01e48a4 + a868fc4 commit a435ff4

19 files changed

+1542
-805
lines changed

Project.toml

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
name = "ModelPredictiveControl"
22
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
33
authors = ["Francis Gagnon"]
4-
version = "1.3.5"
4+
version = "1.4.0"
55

66
[deps]
7+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
8+
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
9+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
710
ControlSystemsBase = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e"
811
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
912
Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
1013
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
11-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1214
OSQP = "ab2f91bb-94b4-55e3-9ba0-7f65df51de79"
1315
PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
1416
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
1517
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
16-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1718
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1819

1920
[compat]
21+
julia = "1.10"
22+
LinearAlgebra = "1.10"
23+
Logging = "1.10"
24+
Random = "1.10"
2025
ControlSystemsBase = "1.9"
2126
ForwardDiff = "0.10"
2227
Ipopt = "1"
2328
JuMP = "1.21"
24-
LinearAlgebra = "1.6"
2529
OSQP = "0.8"
2630
PreallocationTools = "0.4.14"
2731
PrecompileTools = "1"
2832
ProgressLogging = "0.1"
29-
Random = "1.6"
3033
RecipesBase = "1"
3134
TestItemRunner = "1.1"
32-
julia = "1.10"
3335

3436
[extras]
3537
DAQP = "c47d62df-3981-49c8-9651-128b1cd08617"

docs/Project.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[deps]
2+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
3+
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
24
ControlSystemsBase = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e"
35
DAQP = "c47d62df-3981-49c8-9651-128b1cd08617"
46
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
57
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
6-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
7-
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
88
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
99
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1010

1111
[compat]
12+
LinearAlgebra = "1.10"
13+
Logging = "1.10"
1214
ControlSystemsBase = "1"
13-
DAQP = "0.5"
1415
Documenter = "1"
1516
JuMP = "1"
16-
LinearAlgebra = "1.6"
17-
Logging = "1.6"
17+
DAQP = "0.6"
1818
Plots = "1"
1919
ModelingToolkit = "9.50"

docs/src/internals/predictive_control.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,32 @@ The prediction methodology of this module is mainly based on Maciejowski textboo
1212
## Controller Construction
1313

1414
```@docs
15-
ModelPredictiveControl.init_ΔUtoU
15+
ModelPredictiveControl.init_ZtoΔU
16+
ModelPredictiveControl.init_ZtoU
1617
ModelPredictiveControl.init_predmat
18+
ModelPredictiveControl.init_defectmat
1719
ModelPredictiveControl.relaxU
1820
ModelPredictiveControl.relaxΔU
1921
ModelPredictiveControl.relaxŶ
2022
ModelPredictiveControl.relaxterminal
2123
ModelPredictiveControl.init_quadprog
2224
ModelPredictiveControl.init_stochpred
2325
ModelPredictiveControl.init_matconstraint_mpc
26+
ModelPredictiveControl.init_nonlincon!
2427
```
2528

2629
## Update Quadratic Optimization
2730

2831
```@docs
2932
ModelPredictiveControl.initpred!(::PredictiveController, ::LinModel, ::Any, ::Any, ::Any, ::Any)
3033
ModelPredictiveControl.linconstraint!(::PredictiveController, ::LinModel)
34+
ModelPredictiveControl.linconstrainteq!
3135
```
3236

3337
## Solve Optimization Problem
3438

3539
```@docs
3640
ModelPredictiveControl.optim_objective!(::PredictiveController)
41+
ModelPredictiveControl.set_warmstart!
3742
ModelPredictiveControl.getinput
3843
```

docs/src/public/predictive_control.md

+20
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,23 @@ NonLinMPC
8888
```@docs
8989
moveinput!
9090
```
91+
92+
## Direct Transcription Methods
93+
94+
### TranscriptionMethod
95+
96+
```@docs
97+
ModelPredictiveControl.TranscriptionMethod
98+
```
99+
100+
### SingleShooting
101+
102+
```@docs
103+
SingleShooting
104+
```
105+
106+
### MultipleShooting
107+
108+
```@docs
109+
MultipleShooting
110+
```

src/ModelPredictiveControl.jl

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export SteadyKalmanFilter, KalmanFilter, UnscentedKalmanFilter, ExtendedKalmanFi
3232
export MovingHorizonEstimator
3333
export default_nint, initstate!
3434
export PredictiveController, ExplicitMPC, LinMPC, NonLinMPC, setconstraint!, moveinput!
35+
export SingleShooting, MultipleShooting
3536
export SimResult, getinfo, sim!
3637

3738
include("general.jl")

0 commit comments

Comments
 (0)