Skip to content

Commit bba75dd

Browse files
committed
init: JuMPProblem
1 parent cd558a2 commit bba75dd

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

ext/MTKCASADIExt.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
an ODESystem with constraints to a JuMPProblem for optimal control solving.
3+
"""
4+
function CASADIProblem(sys::ODESystem)
5+
6+
end
7+
8+
9+
function CASADIProblem(prob::ODEProblem)
10+
11+
end

ext/MTKJuMPExt.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using JuMP, InfiniteOpt
2+
3+
"""
4+
Convert an ODESystem with constraints to a JuMPProblem for optimal control solving.
5+
"""
6+
function JuMPProblem(sys::ODESystem, u0, tspan, p; dt = error("dt must be provided for JuMPProblem."))
7+
steps = tspan[1]:dt:tspan[2]
8+
nsteps = length(steps)
9+
cost = sys.cost
10+
coalesce = sys.coalesce
11+
12+
@variables
13+
@variables
14+
@variables
15+
end
16+
17+
function symbolic_to_jump_constraint(cons::Union{Num, BasicSymbolic})
18+
19+
end

0 commit comments

Comments
 (0)