# ODEProblem gives error when using symbolic maps for parameters

**URL:** https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509
**Category:** General Usage
**Tags:** differentialequation
**Created:** [January 4, 2023, 1:29pm UTC](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509 "2023-01-04T13:29:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Lucalino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucalino/32/20983_2.png) [@Lucalino](https://discourse.julialang.org/u/Lucalino)
#### Post date: [January 4, 2023, 1:29pm UTC](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509/1 "2023-01-04T13:29:44Z")

</div>

Hi, I am trying to solve an ODEProblem for which I want to provide parameters in the form of a dictionary `Dict{Symbol, Any}`. This used to work in the past but now I get the following error message:  
`ArgumentError: This problem does not support symbolic maps with 'remake', i.e. it does not have a symbolic origin. Please use 'remake' with the 'p' keyword argument as a vector of values, paying attention to parameter order.`

Here’s a simple example which showcases what I would like to do and which results in the above error:

```julia
function lorenz!(du,u,p,t)
    @unpack a, b, c = p
    du[1] = a*(u[2]-u[1])
    du[2] = u[1]*(b-u[3]) - u[2]
    du[3] = u[1]*u[2] - c*u[3]
end

u0 = [1.0;0.0;0.0]
p = Dict{Symbol, Any}(
    :a => 10.0,
    :b => 28.0,
    :c => 8/3,
)
tspan = (0.0,100.0)
prob = ODEProblem(lorenz!,u0,tspan,p)
sol = solve(prob,Tsit5())

```

Is there a way that allows me to continue using my dictionary and get this working? (I stumbled over ModelingToolkit.jl which might provide a solution but I couldn’t quite figure out what I need to do…)

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [January 4, 2023, 1:53pm UTC](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509/2 "2023-01-04T13:53:58Z")

</div>

Open an issue. We may need a way to provide an opt-out here.

---

<div class="post-metadata">

### Author: ![Lucalino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucalino/32/20983_2.png) [@Lucalino](https://discourse.julialang.org/u/Lucalino)
#### Post date: [January 4, 2023, 2:07pm UTC](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509/3 "2023-01-04T14:07:04Z")

</div>

Thanks for your reply. I opened an issue.

---

<div class="post-metadata">

### Author: ![churli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/churli/32/22048_2.png) [@churli](https://discourse.julialang.org/u/churli)
#### Post date: [January 26, 2023, 12:54pm UTC](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509/4 "2023-01-26T12:54:40Z")

</div>

For anyone else looking for the same error, the issue is here:  
[https://github.com/SciML/DifferentialEquations.jl/issues/922](https://github.com/SciML/DifferentialEquations.jl/issues/922)

---

<div class="post-metadata">

### Author: ![Lucalino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucalino/32/20983_2.png) [@Lucalino](https://discourse.julialang.org/u/Lucalino)
#### Post date: [January 27, 2023, 11:50am UTC](https://discourse.julialang.org/t/odeproblem-gives-error-when-using-symbolic-maps-for-parameters/92509/5 "2023-01-27T11:50:13Z")

</div>

… and you’ll find a simple workaround in the issue comments, this workaround being  
`p = NamedTuple([pair for pair in p])` which turns the dictionary into a named tuple. The named tuple should then work as an input to ODEProblem().
