Skip to content

Tutorial ODE Problem does not run #493

@ghost

Description

The tutorial Lorenz problem results in a MethodError in Julia 1.42. Please resolve this.

using DifferentialEquations
using Plots
using BenchmarkTools
using ModelingToolkit

@parameters t σ ρ β
@variables x(t) y(t) z(t)
@derivatives D'~t

eqs2 = [ D(x) ~ σ * (y - x),
D(y) ~ x * (ρ - z) - y,
D(z) ~ x * y - β * z ]

sys = ODESystem(eqs)
u0 = [x => 1.0
y => 0.0
z => 0.0 ]

p = [ σ => 10.0
ρ => 28.0
β => 8/3 ]

tspan = (0.0, 100.0)
prob = ODEProblem(sys, u0, tspan, p ; jac = true, sparse = true)

MethodError: no method matching ODEFunction{true,F,TMM,Ta,Tt,TJ,JVP,VJP,JP,TW,TWt,TPJ,S,TCV} where TCV where S where TPJ where TWt where TW where JP where VJP where JVP where TJ where Tt where Ta where TMM where F(::ODESystem, ::Array{Variable,1}, ::Array{Variable,1}; analytic=nothing, tgrad=Base.RefValue{Array{Expression,1}}(Expression[]), jac=Base.RefValue{Array{Expression,2}}(Array{Expression}(undef,0,0)), jvp=nothing, vjp=nothing, Wfact=Base.RefValue{Array{Expression,2}}(Array{Expression}(undef,0,0)), Wfact_t=Base.RefValue{Array{Expression,2}}(Array{Expression}(undef,0,0)), paramjac=nothing, syms=nothing, colorvec=nothing)
Closest candidates are:
ODEFunction{true,F,TMM,Ta,Tt,TJ,JVP,VJP,JP,TW,TWt,TPJ,S,TCV} where TCV where S where TPJ where TWt where TW where JP where VJP where JVP where TJ where Tt where Ta where TMM where F(::ModelingToolkit.AbstractODESystem, ::Any, ::Any; version, tgrad, jac, Wfact) where iip at C:\Users\drfre.juliapro\JuliaPro_v1.4.2-1\packages\ModelingToolkit\N4mo2\src\systems\diffeqs\abstractodesystem.jl:125 got unsupported keyword arguments "analytic", "jvp", "vjp", "Wfact_t", "paramjac", "syms", "colorvec"
ODEFunction{true,F,TMM,Ta,Tt,TJ,JVP,VJP,JP,TW,TWt,TPJ,S,TCV} where TCV where S where TPJ where TWt where TW where JP where VJP where JVP where TJ where Tt where Ta where TMM where F(::ModelingToolkit.AbstractODESystem, ::Any) where iip at C:\Users\drfre.juliapro\JuliaPro_v1.4.2-1\packages\ModelingToolkit\N4mo2\src\systems\diffeqs\abstractodesystem.jl:125 got unsupported keyword arguments "analytic", "tgrad", "jac", "jvp", "vjp", "Wfact", "Wfact_t", "paramjac", "syms", "colorvec"
ODEFunction{true,F,TMM,Ta,Tt,TJ,JVP,VJP,JP,TW,TWt,TPJ,S,TCV} where TCV where S where TPJ where TWt where TW where JP where VJP where JVP where TJ where Tt where Ta where TMM where F(::ModelingToolkit.AbstractODESystem) where iip at C:\Users\drfre.juliapro\JuliaPro_v1.4.2-1\packages\ModelingToolkit\N4mo2\src\systems\diffeqs\abstractodesystem.jl:125 got unsupported keyword arguments "analytic", "tgrad", "jac", "jvp", "vjp", "Wfact", "Wfact_t", "paramjac", "syms", "colorvec"
...
in top-level scope at oregonator.jl:86
in at DiffEqBase\jMOwn\src\problems\ode_problems.jl:76
in #ODEProblem#214 at DiffEqBase\jMOwn\src\problems\ode_problems.jl:76
in convert at DiffEqBase\jMOwn\src\diffeqfunction.jl:989
in at ModelingToolkit\N4mo2\src\systems\diffeqs\abstractodesystem.jl:111
in #ODEFunction#79 at ModelingToolkit\N4mo2\src\systems\diffeqs\abstractodesystem.jl:111
in at ModelingToolkit\N4mo2\src\systems\diffeqs\abstractodesystem.jl:125
in at ModelingToolkit\N4mo2\src\systems\diffeqs\abstractodesystem.jl:125
in kwerr at base\error.jl:157

Package status:
(@v1.4) pkg> status
Status C:\Users\drfre\.juliapro\JuliaPro_v1.4.2-1\environments\v1.4\Project.toml
[2169fc97] AlgebraicMultigrid v0.3.0
[f5f396d3] ApproxBayes v0.3.2
[ec485272] ArnoldiMethod v0.0.4
[7d9fca2a] Arpack v0.4.0
[c52e3926] Atom v0.12.11 ⚲
[6e4b80f9] BenchmarkTools v0.5.0
[a134a8b2] BlackBoxOptim v0.5.0
[764a87c0] BoundaryValueDiffEq v2.5.0
[1aa9af3a] BridgeDiffEq v0.1.0
[336ed68f] CSV v0.6.1
[8f4d0f93] Conda v1.4.1
[a93c6f00] DataFrames v0.20.2
[864edb3b] DataStructures v0.17.17
[ebbdde9d] DiffEqBayes v2.12.0
[eb300fae] DiffEqBiological v4.3.0
[9fdde737] DiffEqOperators v4.10.0
[1130ab10] DiffEqParamEstim v1.15.0
[ef61062a] DiffEqUncertainty v1.4.1
[0c46a032] DifferentialEquations v6.9.0
[b4f34e82] Distances v0.8.2
[bbc10e6e] DynamicHMC v2.1.5
[61744808] DynamicalSystems v1.3.0
[587475ba] Flux v0.10.4
[f6369f11] ForwardDiff v0.10.10
[14197337] GenericLinearAlgebra v0.2.3
[7073ff75] IJulia v1.21.2
[40713840] IncompleteLU v0.1.1
[d0351b0e] InspectDR v0.3.7
[c601a237] Interact v0.10.3
[4076af6c] JuMP v0.21.2
[e5e0dc1b] Juno v0.8.2 ⚲
[0b1a1467] KrylovKit v0.4.2
[0fc2ff8b] LeastSquaresOptim v0.7.5
[eff96d63] Measurements v2.2.1
[961ee093] ModelingToolkit v2.0.0
[76087f3c] NLopt v0.6.0
[81d43f40] Noise v0.2.0
[47be7bcc] ORCA v0.3.1
[429524aa] Optim v0.20.6
[1dea7af3] OrdinaryDiffEq v5.26.8
[8314cec4] PGFPlotsX v1.2.6
[65888b18] ParameterizedFunctions v5.3.0
[06bb1623] PenaltyFunctions v0.2.2
[4722fa14] PkgAuthentication v0.1.2
[14b8a8f1] PkgTemplates v0.7.2
[f0f68f2c] PlotlyJS v0.12.92
[91a5bcdd] Plots v0.28.4
[438e738f] PyCall v1.91.4
[d330b81b] PyPlot v2.9.0
[731186ca] RecursiveArrayTools v1.2.1
[b0e4dd01] RollingFunctions v0.6.2
[05bca326] SimpleDiffEq v1.0.2
[684fba80] SparsityDetection v0.3.2
[276daf66] SpecialFunctions v0.10.3
[682df890] Stan v6.0.5
[90137ffa] StaticArrays v0.11.1
[29a0d76e] StochasticDelayDiffEq v0.1.0
[789caeaf] StochasticDiffEq v6.16.1
[c3572dad] Sundials v3.8.3
[123dc426] SymEngine v0.8.2
[24249f21] SymPy v1.0.25
[37b6cedf] Traceur v0.3.1
[29a6e085] Wavelets v0.9.0
[44d3d7a6] Weave v0.10.2
[0f1e0344] WebIO v0.8.92
[e88e6eb3] Zygote v0.4.20
[8bb1440f] DelimitedFiles
[37e2e46d] LinearAlgebra
[44cfe95a] Pkg
[de0858da] Printf
[9a3f8284] Random
[2f01184e] SparseArrays
[10745b16] Statistics
[8dfed614] Test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions