Skip to content

Commit b34540b

Browse files
Merge pull request #502 from rmsrosa/reseed_noisetransport
Reseed noisetransport
2 parents 914a509 + 5e37e26 commit b34540b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ArrayInterface = "2.4, 3.0, 4, 5, 6"
3636
DataStructures = "0.18"
3737
DiffEqBase = "6.19"
3838
JumpProcesses = "9"
39-
DiffEqNoiseProcess = "5.0.0"
39+
DiffEqNoiseProcess = "5.13"
4040
DocStringExtensions = "0.8, 0.9"
4141
FillArrays = "0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13"
4242
FiniteDiff = "2"

src/solve.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,13 +414,14 @@ function DiffEqBase.__init(
414414
elseif typeof(prob) <: DiffEqBase.AbstractRODEProblem
415415
W = prob.noise
416416
if W.reset
417-
if W.curt != t
418-
reinit!(W,t,t0=t)
419-
end
420417
# Reseed
421-
if typeof(W) <: NoiseProcess && W.reseed
418+
if typeof(W) <: Union{NoiseProcess, NoiseTransport} && W.reseed
422419
Random.seed!(W.rng,_seed)
423420
end
421+
if W.curt != t
422+
reinit!(W,t,t0=t)
423+
end
424+
424425
elseif W.curt != t
425426
error("Starting time in the noise process is not the starting time of the simulation. The noise process should be re-initialized for repeated use")
426427
end

0 commit comments

Comments
 (0)