Skip to content

Commit 640606f

Browse files
ocotsgithub-actions[bot]
authored andcommitted
🤖 Format .jl files
1 parent c811119 commit 640606f

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

test/extras/plot_variable.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ import CTParser: CTParser, @def
77
CTParser.set_prefix(:CTModels); # code generated by @def is prefixed by CTModels (not by OptimalControl - the default)
88

99
ocp = @def begin
10-
11-
tf R, variable
12-
t [0, tf], time
10+
tf R, variable
11+
t [0, tf], time
1312
x = (q, v) R², state
14-
u R, control
13+
u R, control
1514

1615
tf 0
1716
-1 u(t) 1
1817

19-
q(0) == -1
20-
v(0) == 0
18+
q(0) == -1
19+
v(0) == 0
2120
q(tf) == 0
2221
v(tf) == 0
2322

@@ -26,8 +25,7 @@ ocp = @def begin
2625
(t) == [v(t), u(t)]
2726

2827
tf min
29-
3028
end
3129

3230
sol = CTDirect.solve(ocp; print_level=4)
33-
plot(sol, ocp)
31+
plot(sol, ocp)

0 commit comments

Comments
 (0)