Skip to content

Commit 6eaa0f4

Browse files
committed
new CTFlows
1 parent 7b71305 commit 6eaa0f4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/extras/ocp.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ using ADNLPModels
1111
using NLPModelsIpopt
1212
using MadNLP
1313

14+
n=2
1415
@def ocp begin
1516
tf R, variable
1617
t [0, tf], time
17-
x R², state
18+
x R^n, state
1819
u R, control
1920
-1 u(t) 1
2021
x(0) == [0, 0]
2122
x(tf) == [1, 0]
2223
0.05 tf Inf
2324
(t) == [x₂(t), u(t)]
2425
tf min
25-
end
26+
end true
2627

2728
sol = solve(ocp, :adnlp, :ipopt; print_level=5);

0 commit comments

Comments
 (0)