-
Notifications
You must be signed in to change notification settings - Fork 1
[Dev] First parsing #36
Copy link
Copy link
Open
Labels
internal devModification to the code is requested and should not affect user experimentModification to the code is requested and should not affect user experiment
Description
@AnasXbouali This idea is to convert this
ocp = @loss_def begin
t ∈ [ 0, tf ], time
x ∈ R^2, state
u ∈ R, control
0.5 ≤ x₂(t) ≤ 3.5, loss_region
x₁(0) == 0
x₂(0) == 0
x₂(tf) == 4
-π/2 ≤ u(t) ≤ π/2
∂x₁ = x₂(t) + cos(u(t))
∂x₂ = sin(u(t))
ẋ(t) == [ ∂x₁, ∂x₂ ]
-x₁(tf) → min
endto
ocp = @loss_def begin
t ∈ [ 0, tf ], time
x ∈ R^2, state
u ∈ R, control
x₁(0) == 0
x₂(0) == 0
x₂(tf) == 4
-π/2 ≤ u(t) ≤ π/2
∂x₁ = x₂(t) + cos(u(t))
∂x₂ = sin(u(t))
ẋ(t) == [ ∂x₁, ∂x₂ ]
-x₁(tf) → min
endand then, to parse it with @def from CTBase.jl.
- Remove all the lines with
loss_regiontag. - Parse the new expression with
@def.
Warning
It is important to add some unit tests here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
internal devModification to the code is requested and should not affect user experimentModification to the code is requested and should not affect user experiment