Skip to content

Commit c2e47b7

Browse files
committed
test kwargs updated
1 parent f2a167e commit c2e47b7

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

test/figures/init/beam.pdf

0 Bytes
Binary file not shown.

test/figures/init/chain.pdf

66.2 KB
Binary file not shown.

test/runtests.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ problems_to_exclude = [
3636
:bioreactor,
3737
:cart_pendulum,
3838
:dielectrophoretic_particle,
39-
:moon_lander,
39+
:moonlander,
4040
]
4141
list_of_problems = setdiff(list_of_problems, problems_to_exclude)
4242

@@ -57,12 +57,12 @@ const VERBOSE = true # print or not details during tests
5757
for name in (
5858
#:aqua,
5959
:kwargs,
60-
:JuMP, # convergence tests for JuMP models
61-
:OptimalControl, # convergence tests for OptimalControl models
62-
:OptimalControl_s, # convergence tests for OptimalControl models
63-
:init, # comparison between OptimalControl and JuMP: init
64-
:solution, # comparison between OptimalControl and JuMP: solution
65-
:quick, # quick comparison: objective rel error only
60+
# :JuMP, # convergence tests for JuMP models
61+
# :OptimalControl, # convergence tests for OptimalControl models
62+
# :OptimalControl_s, # convergence tests for OptimalControl models
63+
# :init, # comparison between OptimalControl and JuMP: init
64+
# :solution, # comparison between OptimalControl and JuMP: solution
65+
# :quick, # quick comparison: objective rel error only
6666
)
6767
@testset "$(name)" verbose=VERBOSE begin
6868
test_name = Symbol(:test_, name)

test/test_kwargs.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ function test_kwargs()
1616
@test docp.time.steps == N
1717
@test docp.discretization isa CTDirect.Euler
1818

19+
# OptimalControl_s model
20+
docp = OptimalControlProblems.eval(Symbol(f, :_s))(
21+
OptimalControlBackend(), :madnlp, :exa; grid_size=N, disc_method=scheme
22+
)
23+
@test docp isa CTDirect.DOCP
24+
@test docp.time.steps == N
25+
@test docp.discretization isa CTDirect.Euler
26+
1927
# JuMP model
2028
nlp = OptimalControlProblems.eval(f)(JuMPBackend(), optimiser; add_bridges=true)
2129
@test solver_name(nlp) == "Ipopt"

0 commit comments

Comments
 (0)