Skip to content

Commit 03d6e31

Browse files
committed
test: h>1 with OrthogonalCollocation
1 parent ba02255 commit 03d6e31

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/controller/transcription.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ end
129129
Construct an orthogonal collocation on finite elements [`TranscriptionMethod`](@ref).
130130
131131
Also known as pseudo-spectral method. It supports continuous-time [`NonLinModel`](@ref)s
132-
only. The `h` argument is the hold order for ``\mathbf{u}``, and the `no` argument, the
133-
number of collocation points ``n_o``. The decision variable is similar to [`MultipleShooting`](@ref),
134-
but it also includes the collocation points:
132+
only. The `h` argument is the hold order for ``\mathbf{u}`` (`0` or `1`), and the `no`
133+
argument, the number of collocation points ``n_o``. The decision variable is similar to
134+
[`MultipleShooting`](@ref), but it also includes the collocation points:
135135
```math
136136
\mathbf{Z} = \begin{bmatrix} \mathbf{ΔU} \\ \mathbf{X̂_0} \\ \mathbf{K} \end{bmatrix}
137137
```

test/3_test_predictive_control.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,10 +877,11 @@ end
877877
@test isa(nmpc15.optim, JuMP.GenericModel{Float64}) # Ipopt does not support Float32
878878

879879
@test_throws ArgumentError NonLinMPC(nonlinmodel)
880-
@test_throws ArgumentError NonLinMPC(nonlinmodel, Hp=2, transcription=TrapezoidalCollocation())
881-
@test_throws ArgumentError NonLinMPC(nonlinmodel, Hp=2, transcription=TrapezoidalCollocation(2))
882880
@test_throws ArgumentError NonLinMPC(nonlinmodel, Hp=2, Wy=[1 0;0 1])
881+
@test_throws ArgumentError NonLinMPC(nonlinmodel, Hp=2, transcription=TrapezoidalCollocation())
882+
@test_throws ArgumentError TrapezoidalCollocation(2)
883883
@test_throws ArgumentError OrthogonalCollocation(roots=:gausslobatto)
884+
@test_throws ArgumentError OrthogonalCollocation(2)
884885
end
885886

886887
@testitem "NonLinMPC moves and getinfo (LinModel)" setup=[SetupMPCtests] begin

0 commit comments

Comments
 (0)