@@ -183,13 +183,8 @@ function add_jump_cost_function!(model::InfiniteModel, sys, tspan, pmap; is_free
183
183
op = MTK. operation (int)
184
184
arg = only (arguments (MTK. value (int)))
185
185
lo, hi = (op. domain. domain. left, op. domain. domain. right)
186
- @show hi
187
- @show pmap
188
- @show haskey (pmap, hi)
189
- hi = haskey (pmap, hi) ? 1 : hi
190
- @show hi
191
- @show typeof (arg)
192
- @show typeof (lo)
186
+ lo = MTK. value (lo)
187
+ hi = haskey (pmap, hi) ? 1 : MTK. value (hi)
193
188
intmap[int] = tₛ * InfiniteOpt.∫ (arg, model[:t ], lo, hi)
194
189
end
195
190
jcosts = map (c -> Symbolics. substitute (c, intmap), jcosts)
@@ -262,7 +257,7 @@ function substitute_jump_vars(model, sys, pmap, exprs; auxmap = Dict(), is_free_
262
257
exprs
263
258
end
264
259
265
- is_explicit (tableau) = tableau isa DiffEqDevTools . ExplicitRKTableau
260
+ is_explicit (tableau) = tableau isa DiffEqBase . ExplicitRKTableau
266
261
267
262
function add_infopt_solve_constraints! (model:: InfiniteModel , sys, pmap; is_free_t = false )
268
263
# Differential equations
@@ -346,7 +341,7 @@ function constructDefault(T::Type = Float64)
346
341
α = map (T, α)
347
342
c = map (T, c)
348
343
349
- (; A = A , α = α, c = c )
344
+ DiffEqBase . ImplicitRKTableau (A, c , α, 5 )
350
345
end
351
346
352
347
"""
@@ -362,7 +357,11 @@ function DiffEqBase.solve(
362
357
prob:: JuMPDynamicOptProblem , jump_solver, ode_solver:: Symbol = :Default ; silent = false )
363
358
model = prob. model
364
359
tableau_getter = Symbol (:construct , ode_solver)
365
- @eval tableau = $ tableau_getter ()
360
+ if ode_solver == :Default
361
+ @eval tableau = $ tableau_getter ()
362
+ else
363
+ @eval tableau = Main.$ tableau_getter ()
364
+ end
366
365
silent && set_silent (model)
367
366
368
367
# Unregister current solver constraints
0 commit comments