Skip to content

Commit dfeea0e

Browse files
authored
Merge pull request #72 from control-toolbox/70-dev-update-compat
fix tests
2 parents bc4615e + 1a0be93 commit dfeea0e

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

docs/src/list_of_problems.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ The table below summarizes the names and status of the each problem:
3838
| insurance |||
3939
| jackson |||
4040
| moonlander || 🟠 |
41-
| quadrotor | 🟠 | 🟠🟠 |
41+
| quadrotor | 🟠 | 🟠 |
4242
| robbins |||
4343
| robot |||
4444
| rocket |||
45-
| space_shuttle || 🟠🟠 |
45+
| space_shuttle || 🟠 |
4646
| steering |||
4747
| truck_trailer | 🟠 | 🟠 |
4848
| vanderpol |||
@@ -63,6 +63,5 @@ sb = "yes"
6363
The symbols in the table means:
6464

6565
- ✅ locally solved
66-
- 🟠 locally infeasible
67-
- 🟠🟠 maximum of iterations
66+
- 🟠 locally infeasible or maximum of iterations
6867
- ❌ error during execution

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ using Test
1010
#
1111
@testset verbose = true showtiming = true "OptimalControlProblems tests" begin
1212
for name in (
13-
#:aqua,
14-
#:JuMP,
13+
:aqua,
14+
:JuMP,
1515
:OptimalControl,
1616
)
1717
@testset "$(name)" begin

test/test_JuMP.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function test_JuMP()
3232
optimize!(model)
3333
# Test that the solver found an optimal solution
3434
if f == :truck_trailer || f == :quadrotor
35-
@test termination_status(model) == MOI.LOCALLY_INFEASIBLE
35+
@test (termination_status(model) == MOI.LOCALLY_INFEASIBLE) || (termination_status(model) == MOI.ITERATION_LIMIT)
3636
else
3737
@test termination_status(model) == MOI.LOCALLY_SOLVED
3838
end

test/test_OptimalControl.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ function test_OptimalControl()
3131
)
3232
# Test that the solver found an optimal solution
3333
if f == :moonlander ||
34-
f == :truck_trailer
35-
@test sol.status == :infeasible
36-
elseif f == :quadrotor ||
34+
f == :truck_trailer ||
35+
f == :quadrotor ||
3736
f == :space_shuttle
38-
@test sol.status == :max_iter
37+
@test (sol.status == :infeasible) || (sol.status == :max_iter)
3938
else
4039
@test sol.status == :first_order
4140
end

0 commit comments

Comments
 (0)