@@ -179,11 +179,11 @@ achieved with
179
179
180
180
``` julia
181
181
using Distributed
182
- using DifferentialEquations
182
+ using OrdinaryDiffEq
183
183
using Plots
184
184
185
185
addprocs ()
186
- @everywhere using DifferentialEquations
186
+ @everywhere using OrdinaryDiffEq
187
187
```
188
188
189
189
Now let's define the linear ODE, which is our base problem:
@@ -235,7 +235,7 @@ Because the memory is shared across the different threads, it is not necessary t
235
235
use the ` @everywhere ` macro. Instead, the same problem can be implemented simply as:
236
236
237
237
``` @example ensemble1_2
238
- using DifferentialEquations
238
+ using OrdinaryDiffEq
239
239
prob = ODEProblem((u, p, t) -> 1.01u, 0.5, (0.0, 1.0))
240
240
function prob_func(prob, i, repeat)
241
241
remake(prob, u0 = rand() * prob.u0)
293
293
Now we build the SDE with these functions:
294
294
295
295
``` @example ensemble2
296
- using DifferentialEquations
296
+ using StochasticDiffEq
297
297
p = [1.5, 1.0, 0.1, 0.1]
298
298
prob = SDEProblem(f, g, [1.0, 1.0], (0.0, 10.0), p)
299
299
```
356
356
Our ` prob_func ` will simply randomize the initial condition:
357
357
358
358
``` @example ensemble3
359
- using DifferentialEquations
359
+ using OrdinaryDiffEq
360
360
# Linear ODE which starts at 0.5 and solves from t=0.0 to t=1.0
361
361
prob = ODEProblem((u, p, t) -> 1.01u, 0.5, (0.0, 1.0))
362
362
@@ -427,7 +427,7 @@ function σ(du, u, p, t)
427
427
du[i] = 0.87 * u[i]
428
428
end
429
429
end
430
- using DifferentialEquations
430
+ using StochasticDiffEq
431
431
prob = SDEProblem(f, σ, ones(4, 2) / 2, (0.0, 1.0)) #prob_sde_2Dlinear
432
432
```
433
433
0 commit comments