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

Issue with the use of Measurements.jl #959

Closed
ssemigr opened this issue May 15, 2023 · 1 comment
Closed

Issue with the use of Measurements.jl #959

ssemigr opened this issue May 15, 2023 · 1 comment

Comments

@ssemigr
Copy link

ssemigr commented May 15, 2023

The first example from SciML book 16. Uncertainty Programming, Generalized Uncertainty Quantification of using together DifferentialEquations and Measurements libraries

using OrdinaryDiffEq, Measurements
gaccel = 9.79 ± 0.02; # Gravitational constants
L = 1.00 ± 0.01; # Length of the pendulum
#Initial Conditions
u₀ = [0 ± 0, π / 3 ± 0.02] # Initial speed and initial angle
tspan = (0.0, 6.3)
#Define the problem
function simplependulum(du,u,p,t)
θ = u[1]
dθ = u[2]
du[1] = dθ
du[2] = -(gaccel/L) * sin(θ)
end
#Pass to solvers
prob = ODEProblem(simplependulum, u₀, tspan)
sol = solve(prob, Tsit5(), reltol = 1e-6)

doesn't work anymore, the error is MethodError: no method matching Float64(::Measurement{Float64}).

@ChrisRackauckas
Copy link
Member

This was fixed, tested, and on latest versions runs fine. Please update to the latest versions.

For a full sense of what was fixed, see #950

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