We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b71305 commit 6eaa0f4Copy full SHA for 6eaa0f4
1 file changed
test/extras/ocp.jl
@@ -11,17 +11,18 @@ using ADNLPModels
11
using NLPModelsIpopt
12
using MadNLP
13
14
+n=2
15
@def ocp begin
16
tf ∈ R, variable
17
t ∈ [0, tf], time
- x ∈ R², state
18
+ x ∈ R^n, state
19
u ∈ R, control
20
-1 ≤ u(t) ≤ 1
21
x(0) == [0, 0]
22
x(tf) == [1, 0]
23
0.05 ≤ tf ≤ Inf
24
ẋ(t) == [x₂(t), u(t)]
25
tf → min
-end
26
+end true
27
28
sol = solve(ocp, :adnlp, :ipopt; print_level=5);
0 commit comments