-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Works:
from diffeqpy import de
def f(u,p,t):
x, y, z = u
sigma, rho, beta = p
return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z]
u0 = [1.0,0.0,0.0]
tspan = (0., 100.)
p = [10.0,28.0,8/3]
prob = de.ODEProblem(f, u0, tspan, p)
fast_prob = de.jit(prob)
sol = de.solve(fast_prob,saveat=0.01)
import random
def prob_func(prob,i,rep):
de.remake(prob,u0=[random.uniform(0, 1)*u0[i] for i in range(0,3)],
p=[random.uniform(0, 1)*p[i] for i in range(0,3)])
ensembleprob = de.EnsembleProblem(fast_prob, safetycopy=False)
sol = de.solve(ensembleprob,de.Tsit5(),de.EnsembleSerial(),trajectories=10000,saveat=0.01)Fails:
ensembleprob = de.EnsembleProblem(fast_prob, prob_func = prob_func, safetycopy=False)
sol = de.solve(ensembleprob,de.Tsit5(),de.EnsembleSerial(),trajectories=10000,saveat=0.01)Metadata
Metadata
Assignees
Labels
No labels