# Error when using Unitful and MonteCarloMeasurements with DifferentialEquations

I am trying to use both Unitful and MonteCarloMeasurements with DifferentialEquations to better understand the impact of uncertainty on a second order ODE. Using either Untiful or MonteCarloMeasurements alone with DifferentialEquations is fine but if I try to use all three together I get a lengthy error message.

``````using Plots,Unitful,MonteCarloMeasurements,DifferentialEquations
g3 = 9.81u"m/s^2"
du4 = [10.0Β±.1,10.0Β±.1].*u"m/s"
tspan3 = (0.0,1.0).*u"s"
f3(du,u,p,t) = [0.0u"m/s^2",-g3]
u3 = [0.0,0.0].*u"m"
problem4 = SecondOrderODEProblem(f3,du4,u3,tspan3)
solve(problem4)
``````

Here are the top few lines of the error:

``````MethodError: no method matching (Unitful.Quantity{Float64})(::Int64)

Closest candidates are:

(::Type{T})(::T) where T<:Number

@ Core boot.jl:792

(::Type{T})(!Matched::AbstractChar) where T<:Union{AbstractChar, Number}

@ Base char.jl:50

(::Type{T})(!Matched::Base.TwicePrecision) where T<:Number

@ Base twiceprecision.jl:266

...`````````

You missed the helpful part. Please share the rest.

1. convert(::Type{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}}, ::Int64)@particles.jl:331
2. one(::Type{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}})@number.jl:346
3. recursive_unitless_bottom_eltype(::Type{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}})@utils.jl:240
4. recursive_unitless_bottom_eltype(::Type{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}})@utils.jl:237
5. recursive_unitless_bottom_eltype(::RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}})@utils.jl:231
6. var"#__init#740"(::Tuple{}, ::Tuple{}, ::Tuple{}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, ::Nothing, ::Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Int64, ::Nothing, ::Nothing, ::Rational{Int64}, ::Nothing, ::Bool, ::Int64, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::OrdinaryDiffEq.DefaultInit, ::Base.Pairs{Symbol, Bool, Tuple{Symbol, Symbol}, NamedTuple{(:default_set, :second_time), Tuple{Bool, Bool}}}, ::typeof(SciMLBase.__init), ::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}}, ::OrdinaryDiffEq.Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::Type{Val{true}})@solve.jl:164
7. var"#__solve#739"(::Base.Pairs{Symbol, Bool, Tuple{Symbol, Symbol}, NamedTuple{(:default_set, :second_time), Tuple{Bool, Bool}}}, ::typeof(SciMLBase.__solve), ::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}}, ::OrdinaryDiffEq.Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False})@solve.jl:5
8. var"#__solve#1"(::Bool, ::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:second_time,), Tuple{Bool}}}, ::typeof(SciMLBase.__solve), ::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}}, ::Nothing)@default_solve.jl:14
9. var"#__solve#62"(::Bool, ::Bool, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(SciMLBase.__solve), ::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}})@solve.jl:1249
10. __solve(::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}})@solve.jl:1242
11. var"#solve_call#34"(::Bool, ::DiffEqBase.KeywordArgError, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(DiffEqBase.solve_call), ::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}})@solve.jl:511
12. solve_call(::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}})@solve.jl:481
13. var"#solve_up#42"(::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(DiffEqBase.solve_up), ::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}}, ::Nothing, ::RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, ::SciMLBase.NullParameters)@solve.jl:976
14. solve_up(::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}}, ::Nothing, ::RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, ::SciMLBase.NullParameters)@solve.jl:945
15. var"#solve#40"(::Nothing, ::Nothing, ::Nothing, ::Val{true}, ::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(CommonSolve.solve), ::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}})@solve.jl:882
16. solve(::SciMLBase.ODEProblem{RecursiveArrayTools.ArrayPartition{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64}, 2000}, Tuple{Vector{MonteCarloMeasurements.Particles{Unitful.Quantity{Float64, π π^-1, Unitful.FreeUnits{(m, s^-1), π π^-1, nothing}}, 2000}}, Vector{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(m,), π, nothing}}}}}, Tuple{Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}, Unitful.Quantity{Float64, π, Unitful.FreeUnits{(s,), π, nothing}}}, false, SciMLBase.NullParameters, SciMLBase.DynamicalODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, typeof(Main.var"workspace#152".f3), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SciMLBase.ODEFunction{false, SciMLBase.FullSpecialize, SciMLBase.var"#284#286", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.SecondOrderODEProblem{false}})@solve.jl:872
17. top-level scope@Local: 1 [inlined]

MonteCarloUnitfulDiffEq.jl (70.8 KB)
Iβve attached a copy of the Pluto notebook I was testing.

Awesome thanks, that lead me right to the spot. Took a second to find the time for it though, but the solution is in Support nesting Unitful and MonteCarloMeasurements by ChrisRackauckas Β· Pull Request #279 Β· SciML/RecursiveArrayTools.jl Β· GitHub and itβll be in the next patch release by the end of the day.

1 Like