Skip to content

Commit c72a4e2

Browse files
committed
refactor dynopt tests
1 parent 0d29bae commit c72a4e2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

test/extensions/dynamic_optimization.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using ModelingToolkit
2+
using ModelingToolkit: t_nounits as t, D_nounits as D
23
import InfiniteOpt
34
using DiffEqDevTools, DiffEqBase
45
using SimpleDiffEq
@@ -133,8 +134,6 @@ end
133134

134135
@testset "Linear systems" begin
135136
# Double integrator
136-
t = M.t_nounits
137-
D = M.D_nounits
138137
@variables x(..) v(..)
139138
@variables u(..) [bounds = (-1.0, 1.0), input = true]
140139
constr = [v(1.0) ~ 0.0]
@@ -239,8 +238,6 @@ end
239238
end
240239

241240
@testset "Rocket launch" begin
242-
t = M.t_nounits
243-
D = M.D_nounits
244241

245242
@parameters h_c m₀ h₀ g₀ D_c c Tₘ m_c
246243
@variables h(..) v(..) m(..) = m₀ [bounds = (m_c, 1)] T(..) [input = true, bounds = (0, Tₘ)]
@@ -306,8 +303,6 @@ end
306303
end
307304

308305
@testset "Free final time problems" begin
309-
t = M.t_nounits
310-
D = M.D_nounits
311306

312307
@variables x(..) u(..) [input = true, bounds = (0, 1)]
313308
@parameters tf

0 commit comments

Comments
 (0)