@@ -183,13 +183,8 @@ function add_jump_cost_function!(model::InfiniteModel, sys, tspan, pmap; is_free
183183 op = MTK. operation (int)
184184 arg = only (arguments (MTK. value (int)))
185185 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)
193188 intmap[int] = tₛ * InfiniteOpt.∫ (arg, model[:t ], lo, hi)
194189 end
195190 jcosts = map (c -> Symbolics. substitute (c, intmap), jcosts)
@@ -262,7 +257,7 @@ function substitute_jump_vars(model, sys, pmap, exprs; auxmap = Dict(), is_free_
262257 exprs
263258end
264259
265- is_explicit (tableau) = tableau isa DiffEqDevTools . ExplicitRKTableau
260+ is_explicit (tableau) = tableau isa DiffEqBase . ExplicitRKTableau
266261
267262function add_infopt_solve_constraints! (model:: InfiniteModel , sys, pmap; is_free_t = false )
268263 # Differential equations
@@ -346,7 +341,7 @@ function constructDefault(T::Type = Float64)
346341 α = map (T, α)
347342 c = map (T, c)
348343
349- (; A = A , α = α, c = c )
344+ DiffEqBase . ImplicitRKTableau (A, c , α, 5 )
350345end
351346
352347"""
@@ -362,7 +357,11 @@ function DiffEqBase.solve(
362357 prob:: JuMPDynamicOptProblem , jump_solver, ode_solver:: Symbol = :Default ; silent = false )
363358 model = prob. model
364359 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
366365 silent && set_silent (model)
367366
368367 # Unregister current solver constraints
0 commit comments