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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "CTParser"
uuid = "32681960-a1b1-40db-9bff-a1ca817385d1"
version = "0.8.14"
version = "0.8.15"
authors = ["Jean-Baptiste Caillau <jean-baptiste.caillau@univ-cotedazur.fr>"]

[deps]
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Aqua = "0.8"
BenchmarkTools = "1"
CTBase = "0.18"
CTModels = "0.9"
CTModels = "0.10"
CUDA = "5"
ExaModels = "0.9"
Interpolations = "0.16"
Expand Down
22 changes: 11 additions & 11 deletions test/test_onepass_exa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ function test_onepass_exa()
l_scheme = [:euler, :euler_implicit, :midpoint, :trapeze]
#l_scheme = [:midpoint]
for scheme in l_scheme
__test_onepass_exa(; scheme=scheme)
CUDA.functional() && __test_onepass_exa(CUDABackend(); scheme=scheme)
__test_onepass_exa(; scheme=scheme, print_level=MadNLP.WARN)
CUDA.functional() && __test_onepass_exa(CUDABackend(); scheme=scheme, print_level=MadNLP.WARN)
end
end

Expand Down Expand Up @@ -842,7 +842,7 @@ function __test_onepass_exa(
∂(x₃)(t) == x₁(t)
∂(x₄)(t) == x₁(t)
x₁(0) == 1
x[1:2:3](0) == [1, 2]
x[1:2:3](0) == [1, 3]
x[1:3](0) == [1, 2, 3]
x(0) == [1, 2, 3, 4]
x₁(0) + 2cos(x₂(tf)) → min
Expand All @@ -855,7 +855,7 @@ function __test_onepass_exa(
x ∈ R⁴, state
u ∈ R, control
x₁(tf) == 1
x[1:2:3](tf) == [1, 2]
x[1:2:3](tf) == [1, 3]
x[1:3](tf) == [1, 2, 3]
x(tf) == [1, 2, 3, 4]
∂(x₁)(t) == x₁(t)
Expand All @@ -872,7 +872,7 @@ function __test_onepass_exa(
x ∈ R⁴, state
u ∈ R, control
v₁ == 1
v[1:2:3] == [1, 2]
v[1:2:3] == [1, 3]
v[1:3] == [1, 2, 3]
v == [1, 2, 3, 4]
∂(x₁)(t) == x₁(t)
Expand All @@ -888,7 +888,7 @@ function __test_onepass_exa(
x ∈ R⁴, state
u ∈ R, control
x₁(t) == 1
x[1:2:3](t) == [1, 2]
x[1:2:3](t) == [1, 3]
x[1:3](t) == [1, 2, 3]
x(t) == [1, 2, 3, 4]
∂(x₁)(t) == x₁(t)
Expand All @@ -904,9 +904,9 @@ function __test_onepass_exa(
x ∈ R⁴, state
u ∈ R⁵, control
u₁(t) == 1
u[2:2:4](t) == [1, 2]
u[2:4](t) == [1, 2, 3]
u(t) == [1, 2, 3, 4, 5]
u[2:2:4](t) == [1, 4]
u[2:4](t) == [1, 3, 4]
u(t) == [1, 1, 3, 4, 5]
∂(x₁)(t) == x₁(t)
∂(x₂)(t) == x₁(t)
∂(x₃)(t) == x₁(t)
Expand All @@ -927,13 +927,13 @@ function __test_onepass_exa(
v[1:2] ≤ [1, 2]
v[1:2] ≥ [1, 2]
x[2](t) ≤ 1
x[2:2:4](t) ≤ [1, 2]
x[2:2:4](t) ≤ [1, 3]
x[2:4](t) ≤ [1, 2, 3]
x[2](t) ≥ 1
x[2:2:4](t) ≥ [1, 2]
x[2:4](t) ≥ [1, 2, 3]
u[2](t) ≤ 1
u[2:2:4](t) ≤ [1, 2]
u[2:2:4](t) ≤ [1, 3]
u[2:4](t) ≤ [1, 2, 3]
u[2](t) ≥ 1
u[2:2:4](t) ≥ [1, 2]
Expand Down
12 changes: 6 additions & 6 deletions test/test_onepass_fun.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1727,8 +1727,8 @@ function test_onepass_fun()

# define more variables
u_b = 1.0
u_u = 2.0
u2_b = 3.0
u_u = 3.5
u2_b = 2.5
u2_u = 4.0
v_b = 5.0
v_u = 6.0
Expand Down Expand Up @@ -1760,10 +1760,10 @@ function test_onepass_fun()
n = 2
u_b = 1.0
u_u = 2.0
u2_b = 3.0
u2_u = 4.0
v_b = 5.0
v_u = 6.0
u2_b = 1.5
u2_u = 2.5
v_b = 1.5
v_u = 2.5
@def ocp8 begin
t ∈ [t0, tf], time
x ∈ R^n, state
Expand Down
Loading