Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using Koopman package #110

Open
lakshaya17 opened this issue May 15, 2023 · 6 comments
Open

Error using Koopman package #110

lakshaya17 opened this issue May 15, 2023 · 6 comments

Comments

@lakshaya17
Copy link

Hey,

I am using the SciMLExpectations package, while my MonteCarlo() function is working perfectly but my Koopman() is giving me this issue

MethodError: no method matching logpdf(::Int64, ::Float64)

Some of the types have been truncated in the stacktrace for improved reading. To emit complete information
in the stack trace, evaluate TruncatedStacktraces.VERBOSE[] = true and re-run the code.

Closest candidates are:
logpdf(::UnivariateMixture, ::Real) at C:\Users\lakshay.julia\packages\Distributions\YQQXX\src\mixtures\mixturemodel.jl:363
logpdf(::DiscreteNonParametric, ::Real) at C:\Users\lakshay.julia\packages\Distributions\YQQXX\src\univariate\discrete\discretenonparametric.jl:110
logpdf(::Chi, ::Real) at C:\Users\lakshay.julia\packages\Distributions\YQQXX\src\univariate\continuous\chi.jl:92
...

Stacktrace:
[1] (::SciMLExpectations.var"#2#5")(::Tuple{Int64, Float64})
@ SciMLExpectations .\none:0
[2] MappingRF
@ .\reduce.jl:95 [inlined]
[3] foldl_impl(op::Base.MappingRF{SciMLExpectations.var"#2#5", Base.BottomRF{typeof(Base.add_sum)}}, init::Base.InitialValue, itr::Base.Iterators.Zip{Tuple{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}, StaticArraysCore.MVector{6, Float64}}})
@ Base .\reduce.jl:62
[4] foldl_impl
@ .\reduce.jl:48 [inlined]
[5] mapfoldl_impl
@ .\reduce.jl:44 [inlined]
[6] #mapfoldl#259
@ .\reduce.jl:170 [inlined]
[7] mapfoldl
@ .\reduce.jl:170 [inlined]
[8] #mapreduce#263
@ .\reduce.jl:302 [inlined]
[9] mapreduce
@ .\reduce.jl:302 [inlined]
[10] #sum#266
@ .\reduce.jl:528 [inlined]
[11] sum
@ .\reduce.jl:528 [inlined]
[12] #sum#267
@ .\reduce.jl:557 [inlined]
[13] sum
@ .\reduce.jl:557 [inlined]
[14] pdf_func
@ C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\distribution_utils.jl:17 [inlined]
[15] pdf
@ C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\distribution_utils.jl:25 [inlined]
[16] (::SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, typeof(h), typeof(loss), SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}})(x::StaticArraysCore.MVector{6, Float64}, p::ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:48
[17] substitute_f_vector(t::StaticArraysCore.SVector{6, Float64}, p::ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, f::SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, typeof(h), typeof(loss), SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, lb::StaticArraysCore.SVector{6, Float64}, ub::StaticArraysCore.SVector{6, Float64})
@ Integrals C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\infinity_handling.jl:50
[18] #24
@ C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\infinity_handling.jl:64 [inlined]
[19] #41
@ C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:149 [inlined]
[20] (::HCubature.GenzMalik{6, Float64})(f::Integrals.var"#41#43"{IntegralProblem{false, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Integrals.var"#24#26"{SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, typeof(h), typeof(loss), SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, a::StaticArraysCore.SVector{6, Float64}, b::StaticArraysCore.SVector{6, Float64}, norm::typeof(LinearAlgebra.norm))
@ HCubature C:\Users\lakshay.julia\packages\HCubature\QvyJW\src\genz-malik.jl:121
[21] hcubature
(f::Integrals.var"#41#43"{IntegralProblem{false, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Integrals.var"#24#26"{SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, typeof(h), typeof(loss), SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, a::StaticArraysCore.SVector{6, Float64}, b::StaticArraysCore.SVector{6, Float64}, norm::typeof(LinearAlgebra.norm), rtol
::Float64, atol::Float64, maxevals::Int64, initdiv::Int64)
@ HCubature C:\Users\lakshay.julia\packages\HCubature\QvyJW\src\HCubature.jl:61
[22] #hcubature#3
@ C:\Users\lakshay.julia\packages\HCubature\QvyJW\src\HCubature.jl:179 [inlined]
[23] __solvebp_call(prob::IntegralProblem{false, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, Integrals.var"#24#26"{SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, typeof(h), typeof(loss), SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, alg::HCubatureJL{typeof(LinearAlgebra.norm)}, sensealg::Integrals.ReCallVJP{Integrals.ZygoteVJP}, lb::StaticArraysCore.SVector{6, Float64}, ub::StaticArraysCore.SVector{6, Float64}, p::ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}; reltol::Float64, abstol::Float64, maxiters::Int64)
@ Integrals C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:158
[24] #__solvebp#35
@ C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:123 [inlined]
[25] solve(prob::IntegralProblem{false, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}, SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, typeof(h), typeof(loss), SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, alg::HCubatureJL{typeof(LinearAlgebra.norm)}; sensealg::Integrals.ReCallVJP{Integrals.ZygoteVJP}, do_inf_transformation::Nothing, kwargs::Base.Pairs{Symbol, Real, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:reltol, :abstol, :maxiters), Tuple{Float64, Float64, Int64}}})
@ Integrals C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:108
[26] integrate(quadalg::HCubatureJL{typeof(LinearAlgebra.norm)}, adalg::NonfusedAD, f::Function, lb::StaticArraysCore.SVector{6, Float64}, ub::StaticArraysCore.SVector{6, Float64}, p::ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}; nout::Int64, batch::Int64, kwargs::Base.Pairs{Symbol, Real, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:reltol, :abstol, :maxiters), Tuple{Float64, Float64, Int64}}})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:148
[27] solve(::ExpectationProblem{SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, typeof(loss), typeof(h), GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}}, ::Koopman{NonfusedAD}; maxiters::Int64, batch::Int64, quadalg::HCubatureJL{typeof(LinearAlgebra.norm)}, ireltol::Float64, iabstol::Float64, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:134
[28] solve(::ExpectationProblem{SystemMap{ODEProblem{true,Vector{Float64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, typeof(loss), typeof(h), GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, SciMLExpectations.var"#rand_func#6"{Tuple{Normal{Float64}, Normal{Float64}, Normal{Float64}, Int64, Int64, Int64}}, StaticArraysCore.SVector{6, Float64}, StaticArraysCore.SVector{6, Float64}}, ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}}, ::Koopman{NonfusedAD})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:125
[29] top-level scope
@ In[57]:1


Can you please help me with this ? I dont know if I am missing something

Here is the code I am trying to execute:

using SciMLExpectations

u0s_dis = [cor_dist_1,cor_dist_2,cor_dist_3,0,0,0]

A Genereic function containing all the aspects of the dynamical system you are uncertain about, in this example this is the initial condition.

gd = GenericDistribution(u0s_dis...)

#Covariance matrix

The function h which maps a realization of the uncertainty space to the initial conditions and parameters of the ODEProblem

h(x, u, p) = u, p

prob = ODEProblem(hcw!, u0, tspan, p)

sm = SystemMap(prob, solver)

exprob = ExpectationProblem(sm, loss, h, gd; nout = 1)

sol = solve(exprob,Koopman())
sol.u

Here, problem is the forced dynamics of a system

Regards

@agerlach
Copy link
Contributor

Your u0s_dis and in turn gd should only be over the uncertain variables. The h function is then used to either perform a change of variables or to combine those elements into the full state initial condition and parameter vectors.

u0s_dis = [cor_dist_1,cor_dist_2,cor_dist_3]
gd = GenericDistribution(u0s_dis...)
h(x,u,p) = [x; @views u[4:6]], p

@lakshaya17
Copy link
Author

lakshaya17 commented May 20, 2023

Thank you for the reply.

That means, we are including the rest of the states (3 non-uncertain states) with the previously defined 3 uncertain states in by using u[4:6] in h(x,u,p) = [x; @views u[4:6]], p. Thereby, making the final solution in the as the 6-state variables. Did I understand that correctly?

Regards

@agerlach
Copy link
Contributor

agerlach commented May 20, 2023 via email

@lakshaya17
Copy link
Author

I see. Again, thank you so much for your help.

It's working now.

@lakshaya17
Copy link
Author

InexactError: Int64(33.964214570007954)

Some of the types have been truncated in the stacktrace for improved reading. To emit complete information
in the stack trace, evaluate TruncatedStacktraces.VERBOSE[] = true and re-run the code.

Stacktrace:
[1] Int64
@ .\float.jl:788 [inlined]
[2] convert
@ .\number.jl:7 [inlined]
[3] setindex!
@ .\array.jl:966 [inlined]
[4] unsafe_copyto!(dest::Vector{Int64}, doffs::Int64, src::Vector{Float64}, soffs::Int64, n::Int64)
@ Base .\array.jl:253
[5] unsafe_copyto!
@ .\array.jl:307 [inlined]
[6] copyto_impl!
@ .\array.jl:331 [inlined]
[7] copyto!
@ .\array.jl:317 [inlined]
[8] copyto!
@ .\array.jl:343 [inlined]
[9] copyto_axcheck!
@ .\abstractarray.jl:1127 [inlined]
[10] Array
@ .\array.jl:626 [inlined]
[11] convert
@ .\array.jl:617 [inlined]
[12] (::SystemMap{ODEProblem{true,Vector{Int64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}})(u0::Vector{Float64}, p::Vector{Float64})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\system_utils.jl:19
[13] (::SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Uniform{Float64}, Uniform{Float64}}}, SciMLExpectations.var"#rand_func#6"{Tuple{Uniform{Float64}, Uniform{Float64}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}}, typeof(h), typeof(g), SystemMap{ODEProblem{true,Vector{Int64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}})(x::StaticArraysCore.SVector{2, Float64}, p::ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:48
[14] #41
@ C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:149 [inlined]
[15] (::HCubature.GenzMalik{2, Float64})(f::Integrals.var"#41#43"{IntegralProblem{false, ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}}, SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Uniform{Float64}, Uniform{Float64}}}, SciMLExpectations.var"#rand_func#6"{Tuple{Uniform{Float64}, Uniform{Float64}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}}, typeof(h), typeof(g), SystemMap{ODEProblem{true,Vector{Int64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, a::StaticArraysCore.SVector{2, Float64}, b::StaticArraysCore.SVector{2, Float64}, norm::typeof(LinearAlgebra.norm))
@ HCubature C:\Users\lakshay.julia\packages\HCubature\QvyJW\src\genz-malik.jl:130
[16] hcubature
(f::Integrals.var"#41#43"{IntegralProblem{false, ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}}, SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Uniform{Float64}, Uniform{Float64}}}, SciMLExpectations.var"#rand_func#6"{Tuple{Uniform{Float64}, Uniform{Float64}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}}, typeof(h), typeof(g), SystemMap{ODEProblem{true,Vector{Int64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, a::StaticArraysCore.SVector{2, Float64}, b::StaticArraysCore.SVector{2, Float64}, norm::typeof(LinearAlgebra.norm), rtol
::Float64, atol::Float64, maxevals::Int64, initdiv::Int64)
@ HCubature C:\Users\lakshay.julia\packages\HCubature\QvyJW\src\HCubature.jl:61
[17] #hcubature#3
@ C:\Users\lakshay.julia\packages\HCubature\QvyJW\src\HCubature.jl:179 [inlined]
[18] __solvebp_call(prob::IntegralProblem{false, ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}}, SciMLExpectations.var"#14#15"{GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Uniform{Float64}, Uniform{Float64}}}, SciMLExpectations.var"#rand_func#6"{Tuple{Uniform{Float64}, Uniform{Float64}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}}, typeof(h), typeof(g), SystemMap{ODEProblem{true,Vector{Int64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, alg::HCubatureJL{typeof(LinearAlgebra.norm)}, sensealg::Integrals.ReCallVJP{Integrals.ZygoteVJP}, lb::StaticArraysCore.SVector{2, Float64}, ub::StaticArraysCore.SVector{2, Float64}, p::ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}}; reltol::Float64, abstol::Float64, maxiters::Int64)
@ Integrals C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:158
[19] #__solvebp#35
@ C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:123 [inlined]
[20] #solve#34
@ C:\Users\lakshay.julia\packages\Integrals\9qNWp\src\Integrals.jl:108 [inlined]
[21] integrate(quadalg::HCubatureJL{typeof(LinearAlgebra.norm)}, adalg::NonfusedAD, f::Function, lb::StaticArraysCore.SVector{2, Float64}, ub::StaticArraysCore.SVector{2, Float64}, p::ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}}; nout::Int64, batch::Int64, kwargs::Base.Pairs{Symbol, Real, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:reltol, :abstol, :maxiters), Tuple{Float64, Float64, Int64}}})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:148
[22] solve(::ExpectationProblem{SystemMap{ODEProblem{true,Vector{Int64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, typeof(g), typeof(h), GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Uniform{Float64}, Uniform{Float64}}}, SciMLExpectations.var"#rand_func#6"{Tuple{Uniform{Float64}, Uniform{Float64}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}}, ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}}}, ::Koopman{NonfusedAD}; maxiters::Int64, batch::Int64, quadalg::HCubatureJL{typeof(LinearAlgebra.norm)}, ireltol::Float64, iabstol::Float64, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:134
[23] solve(::ExpectationProblem{SystemMap{ODEProblem{true,Vector{Int64},Tuple{Float64, Float64},…}, Tuple{Tsit5{Static.False,…}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, typeof(g), typeof(h), GenericDistribution{SciMLExpectations.var"#pdf_func#4"{Tuple{Uniform{Float64}, Uniform{Float64}}}, SciMLExpectations.var"#rand_func#6"{Tuple{Uniform{Float64}, Uniform{Float64}}}, StaticArraysCore.SVector{2, Float64}, StaticArraysCore.SVector{2, Float64}}, ArrayPartition{Float64, Tuple{Vector{Int64}, Vector{Float64}}}}, ::Koopman{NonfusedAD})
@ SciMLExpectations C:\Users\lakshay.julia\packages\SciMLExpectations\DWytJ\src\expectation.jl:125
[24] top-level scope
@ In[19]:1

Now it is giving me this issue. It was working before.

@agerlach
Copy link
Contributor

Are you able to solve your ODEProblem directly, e.g. solve(prob, Tsit5())? I suspect that the initial condition you are giving it is an Int vector. It will need to be able to handle floats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants