You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MATLABDiffEq.jl will be included into [DiffEqBenchmarks.jl](https://github.com/JuliaDiffEq/DiffEqBenchmarks.jl). However, the benchmarks are not encouraging to MATLAB at all. Instead, they show that the cost of evaluating functions in MATLAB are too large (note that the functions are re-defined in MATLAB, meaning that they are true MATLAB functions and not interop functions).
113
-
114
-
Running benchmarks at various tolerance using the same Lotka-Volterra problem from before, we get the following:
112
+
The following benchmarks demonstrate a **100x performance advantage for the
113
+
pure-Julia methods over the MATLAB ODE solvers** across a range of stiff and
114
+
non-stiff ODEs. These were ran with Julia 1.2 and MATLAB 2019B after verifying
115
+
negligible overhead on interop.
115
116
116
117
```julia
117
-
using OrdinaryDiffEq, ODEInterfaceDiffEq, Plots, ODE
118
+
using ParameterizedFunctions, MATLABDiffEq, OrdinaryDiffEq, ODEInterface,
119
+
ODEInterfaceDiffEq, Plots, Sundials
118
120
using DiffEqDevTools
119
-
abstols =1./10.^(6:13)
120
-
reltols =1./10.^(3:10)
121
+
using LinearAlgebra
122
+
123
+
## Non-Stiff Problem 1: Lotka-Volterra
124
+
125
+
f =@ode_def_bare LotkaVolterra begin
126
+
dx = a*x - b*x*y
127
+
dy =-c*y + d*x*y
128
+
end a b c d
129
+
p = [1.5,1,3,1]
130
+
tspan = (0.0,10.0)
131
+
u0 = [1.0,1.0]
132
+
prob =ODEProblem(f,u0,tspan,p)
133
+
sol =solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14)
0 commit comments