Skip to content

Commit 1881223

Browse files
authored
harmonize LBA + fix bug
1 parent 8e709ec commit 1881223

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/LBA.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,15 @@ represent samples of evidence per time step and columns represent different accu
231231
232232
- `n_steps=100`: number of time steps at which evidence is recorded
233233
"""
234-
function simulate(rng::AbstractRNG, model::AbstractLBA; n_steps = 100, _...)
234+
function simulate(rng::AbstractRNG, model::AbstractLBA; Δt = 0.01, _...)
235235
(; τ, A, k, ν, σ) = model
236236
b = A + k
237237
n = length(ν)
238238
νs = sample_drift_rates(rng, ν, σ)
239-
a = rand(Uniform(0, A), n)
239+
a = rand(rng,Uniform(0, A), n)
240240
dt = @. (b - a) / νs
241241
choice, t = select_winner(dt)
242-
evidence = collect.(range.(a, a + νs * t, length = 100))
243-
time_steps = range(0, t, length = n_steps)
242+
evidence = collect.(range.(a, a + νs * t, step = Δt))
243+
time_steps = range(0, t, length=length(evidence[1]))
244244
return time_steps, hcat(evidence...)
245245
end

0 commit comments

Comments
 (0)