Skip to content

Commit 9dd5db6

Browse files
committed
doc: minor corrections
1 parent 5ac89b4 commit 9dd5db6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/controller/transcription.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,8 +1169,8 @@ The method mutates `Ŷ0`, `x̂0end`, `X̂0`, `Û0` and `K0` arguments. The aug
11691169
[`f̂!`](@ref) and [`ĥ!`](@ref) functions is called recursively in a `for` loop:
11701170
```math
11711171
\begin{aligned}
1172-
\mathbf{x̂_0}(k+1) &= \mathbf{f̂}\Big(\mathbf{x̂_0}(k), \mathbf{u_0}(k), \mathbf{d_0}(k) \Big) \\
1173-
\mathbf{ŷ_0}(k) &= \mathbf{ĥ}\Big(\mathbf{x̂_0}(k), \mathbf{d_0}(k) \Big)
1172+
\mathbf{x̂_0}(k+1) &= \mathbf{f̂}\Big(\mathbf{x̂_0}(k), \mathbf{u_0}(k), \mathbf{d̂_0}(k) \Big) \\
1173+
\mathbf{ŷ_0}(k) &= \mathbf{ĥ}\Big(\mathbf{x̂_0}(k), \mathbf{d̂_0}(k) \Big)
11741174
\end{aligned}
11751175
```
11761176
"""
@@ -1211,7 +1211,7 @@ Compute vectors if `model` is a [`NonLinModel`](@ref) and other [`TranscriptionM
12111211
The method mutates `Ŷ0` and `x̂0end` arguments. The augmented output function [`ĥ!`](@ref)
12121212
is called multiple times in a `for` loop:
12131213
```math
1214-
\mathbf{ŷ_0}(k) = \mathbf{ĥ}\Big(\mathbf{x̂_0}(k), \mathbf{d_0}(k) \Big)
1214+
\mathbf{ŷ_0}(k) = \mathbf{ĥ}\Big(\mathbf{x̂_0}(k), \mathbf{d̂_0}(k) \Big)
12151215
```
12161216
in which ``\mathbf{x̂_0}`` is the augmented state extracted from the decision variable `Z̃`.
12171217
"""
@@ -1332,7 +1332,7 @@ Nonlinear equality constrains for [`NonLinModel`](@ref) and [`MultipleShooting`]
13321332
The method mutates the `geq`, `X̂0`, `Û0` and `K0` vectors in argument. The nonlinear
13331333
equality constraints `geq` only includes the augmented state defects, computed with:
13341334
```math
1335-
\mathbf{ŝ}(k+1) = \mathbf{f̂}\Big(\mathbf{x̂_0}(k), \mathbf{u_0}(k), \mathbf{d_0}(k)\Big)
1335+
\mathbf{ŝ}(k+1) = \mathbf{f̂}\Big(\mathbf{x̂_0}(k), \mathbf{u_0}(k), \mathbf{d̂_0}(k)\Big)
13361336
- \mathbf{x̂_0}(k+1)
13371337
```
13381338
in which the augmented state ``\mathbf{x̂_0}`` are extracted from the decision variables
@@ -1395,8 +1395,8 @@ extracted from the decision variables `Z̃`. The ``\mathbf{k}`` coefficients are
13951395
evaluated from the continuous-time function `model.f!` and:
13961396
```math
13971397
\begin{aligned}
1398-
\mathbf{k}_1 &= \mathbf{f}\Big(\mathbf{x_0}(k), \mathbf{û_0}(k), \mathbf{d_0}(k) \Big) \\
1399-
\mathbf{k}_2 &= \mathbf{f}\Big(\mathbf{x_0}(k+1), \mathbf{û_0}(k+h), \mathbf{d_0}(k+1)\Big)
1398+
\mathbf{k}_1 &= \mathbf{f}\Big(\mathbf{x_0}(k), \mathbf{û_0}(k), \mathbf{d̂_0}(k) \Big) \\
1399+
\mathbf{k}_2 &= \mathbf{f}\Big(\mathbf{x_0}(k+1), \mathbf{û_0}(k+h), \mathbf{d̂_0}(k+1)\Big)
14001400
\end{aligned}
14011401
```
14021402
in which ``h`` is the hold order `transcription.h` and the disturbed input is:
@@ -1419,7 +1419,6 @@ function con_nonlinprogeq!(
14191419
nk = get_nk(model, transcription)
14201420
D̂0 = mpc.D̂0
14211421
X̂0_Z̃ = @views Z̃[(nΔU+1):(nΔU+nX̂)]
1422-
#TODO: allow parallel for loop or threads?
14231422
@threadsif f_threads for j=1:Hp
14241423
if j < 2
14251424
x̂0 = @views mpc.estim.x̂0[1:nx̂]

0 commit comments

Comments
 (0)