To receive notifications about scheduled maintenance, please subscribe to the mailing-list You can subscribe to the mailing-list at

Commit c8b74e4d authored by Victor's avatar Victor
Browse files

Updated get_xinc to run faster on high dimensional space. Tests do not pass

parent 2d24bb3a
Pipeline #87377 failed with stage
in 16 minutes and 21 seconds
......@@ -177,8 +177,12 @@ function _get_xinc(a::AbstractAgent,s::AbstractSpacesTuple,p::Dict,t::Number)
@unpack D,mu = p
_x = copy(get_x(a))
for (i,ss) in enumerate(s)
if rand() < mu[i]
_x[i] += get_inc(_x[i],D[i],ss,t)
if ndims(ss) > 1
mut = rand(eltype(mu[i]),ndims(ss)) .< mu[i]
_x[i] .+= mut .* get_inc(_x[i],D[i],ss,t)
mut = rand(typeof(mu[i])) < mu[i]
_x[i] += mut * get_inc(_x[i],D[i],ss,t)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment