@@ -52,10 +52,10 @@ function modelingtoolkitize(prob::DiffEqBase.SDEProblem)
5252 else
5353 p = prob. p
5454 end
55- var (x, i) = Sym {FnType{Tuple{symtype(t)}, Real}} (nameof (Variable (: x , i)))
55+ var (x, i) = Num ( Sym {FnType{Tuple{symtype(t)}, Real}} (nameof (Variable (x, i) )))
5656 vars = reshape ([var (:x , i)(value (t)) for i in eachindex (prob. u0)],size (prob. u0))
5757 params = p isa DiffEqBase. NullParameters ? [] :
58- reshape ([Variable (:α ,i ) for i in eachindex (p)],size (p))
58+ reshape ([Num ( Sym {Real} ( nameof ( Variable (:α , i))) ) for i in eachindex (p)],size (p))
5959
6060 @derivatives D' ~ t
6161
@@ -102,10 +102,9 @@ function modelingtoolkitize(prob::DiffEqBase.OptimizationProblem)
102102 p = prob. p
103103 end
104104
105- vars = reshape ([Variable (:x , i) for i in eachindex (prob. u0)],size (prob. u0))
105+ vars = reshape ([Num ( Sym {Real} ( nameof ( Variable (:x , i))) ) for i in eachindex (prob. u0)],size (prob. u0))
106106 params = p isa DiffEqBase. NullParameters ? [] :
107- reshape ([Variable (:α ,i) for i in eachindex (p)],size (Array (p)))
108-
107+ reshape ([Num (Sym {Real} (nameof (Variable (:α , i)))) for i in eachindex (p)],size (Array (p)))
109108
110109 eqs = prob. f (vars, params)
111110 de = OptimizationSystem (eqs,vec (vars),vec (params))
0 commit comments