In [1]:
using StochasticDiffEq, DiffEqDevTools, ParameterizedFunctions, DiffEqProblemLibrary
using Plots; gr()
f = @ode_def LotkaVolterraTest begin
  dx = a*x - b*x*y
  dy = -c*y + d*x*y
end a b c d

p = [1.5,1.0,3.0,1.0]

function g(du,u,p,t)
  du .= 0.1u
end
u0 = [1.0;1.0]
tspan = (0.0,10.0)
prob = SDEProblem(f,g,u0,tspan,p);
INFO: Recompiling stale cache file /home/crackauc/.julia/lib/v0.6/StochasticDiffEq.ji for module StochasticDiffEq.
In [2]:
sol = solve(prob,SRIW1(),abstol=1e-4,reltol=1e-4)
plot(sol)
Out[2]:
0 2 4 6 8 10 1 2 3 4 5 6 t