@@ -74,12 +74,28 @@ eqs = [y ~ src.output.u
7474@named sys = ODESystem (eqs, t, vars, []; systems = [int, src])
7575s = complete (sys)
7676sys = structural_simplify (sys)
77- prob = ODEProblem (sys, [], (0.0 , t_end), [s. src. data => x])
77+ prob = ODEProblem (sys, [], (0.0 , t_end), [s. src. data => x]; tofloat = false )
7878@test prob. p isa Tuple{Vector{Float64}, Vector{Int}, Vector{Vector{Float64}}}
7979sol = solve (prob, ImplicitEuler ());
8080@test sol. retcode == ReturnCode. Success
8181@test sol[y][end ] == x[end ]
8282
83+ # TODO : remake becomes more complicated now, how to improve?
84+ defs = ModelingToolkit. defaults (sys)
85+ defs[s. src. data] = 2 x
86+ p′ = ModelingToolkit. varmap_to_vars (defs, parameters (sys); tofloat= false )
87+ p′, = ModelingToolkit. split_parameters_by_type (p′) # NOTE: we need to ensure this is called now before calling remake()
88+ prob′ = remake (prob; p= p′)
89+ sol = solve (prob′, ImplicitEuler ());
90+ @test sol. retcode == ReturnCode. Success
91+ @test sol[y][end ] == 2 x[end ]
92+
93+ prob′′ = remake (prob; p= [s. src. data => x])
94+ @test prob′′. p isa Tuple
95+
96+
97+
98+
8399# ------------------------ Mixed Type Converted to float (default behavior)
84100
85101vars = @variables y (t)= 1 dy (t)= 0 ddy (t)= 0
0 commit comments