-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
@ocots @PierreMartinon Same kind of error with AD as in #384 tough here the problem seems to be directly related to using a constant in the computation: this fails (Cannot determine ordering of Dual tags ForwardDiff.Tag)
using OptimalControl
using NLPModelsIpopt
o = @def begin
v ∈ R, variable
t ∈ [0, 1], time
x ∈ R², state
u ∈ R, control
-1 ≤ v ≤ 1
x(0) - [-1, v] == [0, 0] # OK: the boundary contraint may involve the variable
x(1) == [0, 0]
ẋ(t) == [x₂(t), u(t)]
∫( 0.5u(t)^2 ) → min
end
s = solve(o)this also fails (same error)
o = @def begin
v ∈ R, variable
t ∈ [0, 1], time
x ∈ R², state
u ∈ R, control
-1 ≤ v ≤ 1
x(0) - [-one(v), v] == [0, 0] # OK: the boundary contraint may involve the variable
x(1) == [0, 0]
ẋ(t) == [x₂(t), u(t)]
∫( 0.5u(t)^2 ) → min
endwhile this is OK
o = @def begin
v ∈ R, variable
t ∈ [0, 1], time
x ∈ R², state
u ∈ R, control
-1 ≤ v ≤ 1
x(0) - [-1 + 0v, v] == [0, 0] # OK: the boundary contraint may involve the variable
x(1) == [0, 0]
ẋ(t) == [x₂(t), u(t)]
∫( 0.5u(t)^2 ) → min
end@PierreMartinon I thought that using one as above (second version; see also zero) solved the problem, but this is not the case. any clue?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working