You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Digging deeper, I found that IteratorSampling.jl might return an out-of-bound output when given an empty iterator. Maybe this issue should be transferred there.
iter =nearby_positions(model[1], model, 1)
iter_filtered = Iterators.filter(pos ->isempty(pos, model), iter)
# If I run collect(iter_filtered), it will return an empty array# Returns a random, maybe out-of-bound output
IteratorSampling.itsample(abmrng(model), iter_filtered; method=:alg_R)
Describe the bug
I found that the
random_nearby_position()
function returned out-of-bounds positions when I failed to run the event ABM example.Minimal Working Example
https://github.com/sosiristseng/agents-out-of-bounds/blob/main/main.jl
The results: https://github.com/sosiristseng/agents-out-of-bounds/actions/runs/8627726973/job/23648255748
Agents.jl version
Agents v6.0.7
The text was updated successfully, but these errors were encountered: