-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
Description
When multiple noise processes are created sequentially with the default TaskLocalRNG or a user passed TaskLocalRNG and no intervening rand calls, copy(rng) gives each process an identical RNG state, resulting in statistically identical samples.
using DiffEqBase, DiffEqNoiseProcess
# Create two WienerProcesses back-to-back with default RNG
W1 = WienerProcess(0.0, 0.0, 0.0; reseed = false)
W2 = WienerProcess(0.0, 0.0, 0.0; reseed = false)
sol1 = solve(NoiseProblem(W1, (0.0, 1.0)); dt = 0.1)
sol2 = solve(NoiseProblem(W2, (0.0, 1.0)); dt = 0.1)
println("W1 samples: ", sol1.W)
println("W2 samples: ", sol2.W)
println("Identical? ", sol1.W == sol2.W)Output (v5.27.0): Identical? true — both processes produce the exact same noise samples.
This is due to the changes made in c305243
Reactions are currently unavailable