#317 API Simplification

Merged Tim DuBois Libbum

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 7 of 43 files from the diff.

@@ -82,7 +82,7 @@
Loading
82 82
83 83
`space` is a subtype of `AbstractSpace`: [`GraphSpace`](@ref), [`GridSpace`](@ref) or
84 84
[`ContinuousSpace`](@ref).
85 -
If it is ommited then all agents are virtually in one node and have no spatial structure.
85 +
If it is ommited then all agents are virtually in one position and have no spatial structure.
86 86
87 87
**Note:** Spaces are mutable objects and are not designed to be shared between models.
88 88
Create a fresh instance of a space with the same properties if you need to do this.

@@ -219,7 +219,7 @@
Loading
219 219
#######################################################################################
220 220
# neighboring agents
221 221
#######################################################################################
222 -
function space_neighbors(pos::Tuple, model::ABM{A, <:ContinuousSpace}, r::Real) where {A}
222 +
function nearby_ids(pos::Tuple, model::ABM{A, <:ContinuousSpace}, r::Real) where {A}
223 223
  left = pos .- r
224 224
  right = pos .+ r
225 225
  res = interlace(left, right)
@@ -230,7 +230,7 @@
Loading
230 230
  ids
231 231
end
232 232
233 -
function space_neighbors(agent::A, model::ABM{A, <:ContinuousSpace}, r::Real) where {A<:AbstractAgent}
233 +
function nearby_ids(agent::A, model::ABM{A, <:ContinuousSpace}, r::Real) where {A<:AbstractAgent}
234 234
  left = agent.pos .- r
235 235
  right = agent.pos .+ r
236 236
  res = interlace(left, right)
@@ -261,7 +261,7 @@
Loading
261 261
Return `nothing` if no agent is within distance `r`.
262 262
"""
263 263
function nearest_neighbor(agent, model, r)
264 -
  n = space_neighbors(agent, model, r)
264 +
  n = nearby_ids(agent, model, r)
265 265
  length(n) == 0 && return nothing
266 266
  d, j = Inf, 1
267 267
  for i in 1:length(n)
@@ -390,7 +390,7 @@
Loading
390 390
391 391
function all_pairs!(pairs::Vector{Tuple{Int,Int}}, model::ABM, r::Real)
392 392
    for a in allagents(model)
393 -
        for nid in space_neighbors(a, model, r)
393 +
        for nid in nearby_ids(a, model, r)
394 394
            # Sort the pair to overcome any uniqueness issues
395 395
            new_pair = isless(a.id, nid) ? (a.id, nid) : (nid, a.id)
396 396
            new_pair ∉ pairs && push!(pairs, new_pair)
@@ -428,7 +428,7 @@
Loading
428 428
    # We don't know ahead of time what types the scheduler will provide. Get a list.
429 429
    available_types = unique(typeof(model[id]) for id in scheduler(model))
430 430
    for id in scheduler(model)
431 -
        for nid in space_neighbors(model[id], model, r)
431 +
        for nid in nearby_ids(model[id], model, r)
432 432
            neigbor_type = typeof(model[nid])
433 433
            if neigbor_type ∈ available_types && neigbor_type !== typeof(model[id])
434 434
                # Sort the pair to overcome any uniqueness issues

@@ -21,7 +21,7 @@
Loading
21 21
22 22
"""
23 23
    nv(model::ABM)
24 -
Return the number of nodes (vertices) in the `model` space.
24 +
Return the number of positions (vertices) in the `model` space.
25 25
"""
26 26
LightGraphs.nv(abm::ABM{<:Any,<:GraphSpace}) = LightGraphs.nv(abm.space.graph)
27 27
@@ -34,7 +34,7 @@
Loading
34 34
function Base.show(io::IO, space::GraphSpace)
35 35
    print(
36 36
        io,
37 -
        "$(nameof(typeof(space))) with $(nv(space.graph)) nodes and $(ne(space.graph)) edges",
37 +
        "$(nameof(typeof(space))) with $(nv(space.graph)) positions and $(ne(space.graph)) edges",
38 38
    )
39 39
end
40 40
@@ -47,9 +47,9 @@
Loading
47 47
    agent::A,
48 48
    model::ABM{A,<:GraphSpace},
49 49
) where {A<:AbstractAgent}
50 -
    agentnode = agent.pos
51 -
    p = get_node_contents(agentnode, model)
52 -
    splice!(p, findfirst(a -> a == agent.id, p))
50 +
    agentpos = agent.pos
51 +
    ids = ids_in_position(agentpos, model)
52 +
    splice!(ids, findfirst(a -> a == agent.id, ids))
53 53
    return model
54 54
end
55 55
@@ -58,49 +58,44 @@
Loading
58 58
    pos::ValidPos,
59 59
    model::ABM{A,<:GraphSpace},
60 60
) where {A<:AbstractAgent}
61 -
    oldnode = agent.pos
62 -
    p = get_node_contents(oldnode, model)
63 -
    splice!(p, findfirst(a -> a == agent.id, p))
61 +
    oldpos = agent.pos
62 +
    ids = ids_in_position(oldpos, model)
63 +
    splice!(ids, findfirst(a -> a == agent.id, ids))
64 64
    agent.pos = pos
65 -
    push!(get_node_contents(agent.pos, model), agent.id)
65 +
    push!(ids_in_position(agent.pos, model), agent.id)
66 66
    return agent
67 67
end
68 68
69 69
function add_agent_to_space!(
70 70
    agent::A,
71 71
    model::ABM{A,<:DiscreteSpace},
72 72
) where {A<:AbstractAgent}
73 -
    push!(get_node_contents(agent.pos, model), agent.id)
73 +
    push!(ids_in_position(agent.pos, model), agent.id)
74 74
    return agent
75 75
end
76 76
77 77
# The following two is for the discrete space API:
78 -
"""
79 -
    get_node_contents(position, model::ABM{A, <:DiscreteSpace})
80 -
81 -
Return the ids of agents in the "node" corresponding to `position`.
82 -
"""
83 -
get_node_contents(n::Integer, model::ABM{A,<:GraphSpace}) where {A} = model.space.s[n]
84 -
# NOTICE: The return type of `get_node_contents` must support `length` and `isempty`!
78 +
ids_in_position(n::Integer, model::ABM{A,<:GraphSpace}) where {A} = model.space.s[n]
79 +
# NOTICE: The return type of `ids_in_position` must support `length` and `isempty`!
85 80
86 -
nodes(model::ABM{<:AbstractAgent,<:GraphSpace}) = 1:nv(model)
81 +
positions(model::ABM{<:AbstractAgent,<:GraphSpace}) = 1:nv(model)
87 82
88 83
#######################################################################################
89 84
# Neighbors
90 85
#######################################################################################
91 -
function space_neighbors(pos::Int, model::ABM{A,<:GraphSpace}, args...; kwargs...) where {A}
92 -
    nn = node_neighbors(pos, model, args...; kwargs...)
86 +
function nearby_ids(pos::Int, model::ABM{A,<:GraphSpace}, args...; kwargs...) where {A}
87 +
    np = nearby_positions(pos, model, args...; kwargs...)
93 88
    # This call is faster than reduce(vcat, ..), or Iterators.flatten
94 -
    vcat(model.space.s[pos], model.space.s[nn]...)
89 +
    vcat(model.space.s[pos], model.space.s[np]...)
95 90
end
96 91
97 -
function space_neighbors(agent::A, model::ABM{A,<:GraphSpace}, args...; kwargs...) where {A<:AbstractAgent}
98 -
    all = space_neighbors(agent.pos, model, args...; kwargs...)
92 +
function nearby_ids(agent::A, model::ABM{A,<:GraphSpace}, args...; kwargs...) where {A<:AbstractAgent}
93 +
    all = nearby_ids(agent.pos, model, args...; kwargs...)
99 94
    filter!(i -> i ≠ agent.id, all)
100 95
end
101 96
102 -
function node_neighbors(
103 -
    node_number::Integer,
97 +
function nearby_positions(
98 +
    position::Integer,
104 99
    model::ABM{A,<:GraphSpace};
105 100
    neighbor_type::Symbol = :default,
106 101
) where {A}
@@ -114,21 +109,21 @@
Loading
114 109
    else
115 110
        LightGraphs.all_neighbors
116 111
    end
117 -
    neighborfn(model.space.graph, node_number)
112 +
    neighborfn(model.space.graph, position)
118 113
end
119 114
120 -
function node_neighbors(
121 -
    node_number::Integer,
115 +
function nearby_positions(
116 +
    position::Integer,
122 117
    model::ABM{A,<:GraphSpace},
123 118
    radius::Integer;
124 119
    kwargs...,
125 120
) where {A}
126 -
    output = copy(node_neighbors(node_number, model; kwargs...))
121 +
    output = copy(nearby_positions(position, model; kwargs...))
127 122
    for _ in 2:radius
128 -
        newnns = (node_neighbors(nn, model; kwargs...) for nn in output)
129 -
        append!(output, reduce(vcat, newnns))
123 +
        newnps = (nearby_positions(np, model; kwargs...) for np in output)
124 +
        append!(output, reduce(vcat, newnps))
130 125
        unique!(output)
131 126
    end
132 -
    filter!(i -> i != node_number, output)
127 +
    filter!(i -> i != position, output)
133 128
end
134 129

@@ -3,65 +3,86 @@
Loading
3 3
Discrete spaces are by definition spaces with a finite amount of possible positions.
4 4
5 5
All these functions are granted "for free" to discrete spaces by simply extending:
6 -
- nodes(model)
7 -
- get_node_contents(position, model)
6 +
- positions(model)
7 +
- ids_in_position(position, model)
8 8
=#
9 9
10 -
export nodes, get_node_contents, find_empty_nodes, pick_empty, has_empty_nodes
10 +
export positions, ids_in_position, agents_in_position, empty_positions, random_empty, has_empty_positions
11 11
12 12
"""
13 -
    nodes(model::ABM{A, <:DiscreteSpace}) → ns
14 -
Return an iterator over all positions of a model with a discrete space (called nodes).
13 +
    positions(model::ABM{A, <:DiscreteSpace}) → ns
14 +
Return an iterator over all positions of a model with a discrete space.
15 15
16 -
    nodes(model::ABM{A, <:DiscreteSpace}, by::Symbol) → ns
17 -
Return all positions of a model with a discrete space (called nodes), sorting them
16 +
    positions(model::ABM{A, <:DiscreteSpace}, by::Symbol) → ns
17 +
Return all positions of a model with a discrete space, sorting them
18 18
using the argument `by` which can be:
19 19
* `:random` - randomly sorted
20 -
* `:population` - nodes are sorted depending on how many agents they accommodate.
21 -
  The more populated nodes are first.
20 +
* `:population` - positions are sorted depending on how many agents they accommodate.
21 +
  The more populated positions are first.
22 22
"""
23 -
function nodes(model::ABM{<:AbstractAgent,<:DiscreteSpace}, by::Symbol)
24 -
    n = collect(nodes(model))
23 +
function positions(model::ABM{<:AbstractAgent,<:DiscreteSpace}, by::Symbol)
24 +
    n = collect(positions(model))
25 25
    itr = reshape(n, length(n))
26 26
    if by == :random
27 27
        shuffle!(itr)
28 28
    elseif by == :population
29 -
        sort!(itr, by = i -> length(get_node_contents(i, model)), rev = true)
29 +
        sort!(itr, by = i -> length(ids_in_position(i, model)), rev = true)
30 30
    else
31 31
        error("unknown `by`")
32 32
    end
33 33
    return itr
34 34
end
35 35
36 -
# TODO: Does this really have to be collecting...?
37 -
function find_empty_nodes(model::ABM{<:AbstractAgent,<:DiscreteSpace})
38 -
    collect(Iterators.filter(i -> length(get_node_contents(i, model)) == 0, nodes(model)))
36 +
"""
37 +
    ids_in_position(position, model::ABM{A, <:DiscreteSpace})
38 +
    ids_in_position(agent, model::ABM{A, <:DiscreteSpace})
39 +
40 +
Return the ids of agents in the position corresponding to `position` or position
41 +
of `agent`.
42 +
"""
43 +
ids_in_position(agent::A, model) where {A<:AbstractAgent} = ids_in_position(agent.pos, model)
44 +
45 +
"""
46 +
    agents_in_position(position, model::ABM{A, <:DiscreteSpace})
47 +
    agents_in_position(agent, model::ABM{A, <:DiscreteSpace})
48 +
49 +
Return the agents in the position corresponding to `position` or position of `agent`.
50 +
"""
51 +
agents_in_position(agent::A, model) where {A<:AbstractAgent} = agents_in_position(agent.pos, model)
52 +
agents_in_position(pos, model) = (model[id] for id in ids_in_position(pos, model))
53 +
54 +
"""
55 +
    empty_positions(model)
56 +
57 +
Return a list of positions that currently have no agents on them.
58 +
"""
59 +
function empty_positions(model::ABM{<:AbstractAgent,<:DiscreteSpace})
60 +
    Iterators.filter(i -> length(ids_in_position(i, model)) == 0, positions(model))
39 61
end
40 62
41 63
"""
42 64
    isempty(position, model::ABM{A, <:DiscreteSpace})
43 -
Return `true` if there are no agents in `node`.
65 +
Return `true` if there are no agents in `position`.
44 66
"""
45 -
Base.isempty(pos, model::ABM) = isempty(get_node_contents(pos, model))
67 +
Base.isempty(pos, model::ABM) = isempty(ids_in_position(pos, model))
46 68
47 69
48 70
"""
49 -
    has_empty_nodes(model::ABM{A, <:DiscreteSpace})
71 +
    has_empty_positions(model::ABM{A, <:DiscreteSpace})
50 72
Return `true` if there are any positions in the model without agents.
51 73
"""
52 -
function has_empty_nodes(model::ABM{<:AbstractAgent,<:DiscreteSpace})
53 -
    s = model.space.s
54 -
    return any(i -> length(i) == 0, s)
74 +
function has_empty_positions(model::ABM{<:AbstractAgent,<:DiscreteSpace})
75 +
    return any(i -> length(i) == 0, model.space.s)
55 76
end
56 77
57 78
"""
58 -
    pick_empty(model::ABM{A, <:DiscreteSpace})
79 +
    random_empty(model::ABM{A, <:DiscreteSpace})
59 80
Return a random position without any agents, or `nothing` if no such positions exist.
60 81
"""
61 -
function pick_empty(model::ABM{<:AbstractAgent,<:DiscreteSpace})
62 -
    empty_nodes = find_empty_nodes(model)
63 -
    isempty(empty_nodes) && return nothing
64 -
    rand(empty_nodes)
82 +
function random_empty(model::ABM{<:AbstractAgent,<:DiscreteSpace})
83 +
    empty = empty_positions(model)
84 +
    isempty(empty) && return nothing
85 +
    rand(collect(empty))
65 86
end
66 87
67 88
#######################################################################################
@@ -73,12 +94,12 @@
Loading
73 94
    add_agent_single!(agent::A, model::ABM{A, <: DiscreteSpace}) → agent
74 95
75 96
Add the `agent` to a random position in the space while respecting a maximum of one agent
76 -
per node position. This function does nothing if there aren't any empty positions.
97 +
per position. This function does nothing if there aren't any empty positions.
77 98
"""
78 99
function add_agent_single!(agent::A, model::ABM{A,<:DiscreteSpace}) where {A<:AbstractAgent}
79 -
    node = pick_empty(model)
80 -
    isnothing(node) && return agent
81 -
    agent.pos = node
100 +
    position = random_empty(model)
101 +
    isnothing(position) && return agent
102 +
    agent.pos = position
82 103
    add_agent_pos!(agent, model)
83 104
    return agent
84 105
end
@@ -93,20 +114,20 @@
Loading
93 114
    properties...;
94 115
    kwargs...,
95 116
) where {A<:AbstractAgent}
96 -
    empty_positions = find_empty_nodes(model)
97 -
    if length(empty_positions) > 0
98 -
        add_agent!(rand(empty_positions), model, properties...; kwargs...)
117 +
    empty = collect(empty_positions(model))
118 +
    if length(empty) > 0
119 +
        add_agent!(rand(empty), model, properties...; kwargs...)
99 120
    end
100 121
end
101 122
102 123
"""
103 124
    fill_space!([A ,] model::ABM{A, <:DiscreteSpace}, args...; kwargs...)
104 125
    fill_space!([A ,] model::ABM{A, <:DiscreteSpace}, f::Function; kwargs...)
105 -
Add one agent to each node in the model's space. Similarly with [`add_agent!`](@ref),
126 +
Add one agent to each position in the model's space. Similarly with [`add_agent!`](@ref),
106 127
the function creates the necessary agents and
107 128
the `args...; kwargs...` are propagated into agent creation.
108 129
If instead of `args...` a function `f` is provided, then `args = f(pos)` is the result of
109 -
applying `f` where `pos` is each position (tuple for grid, node index for graph).
130 +
applying `f` where `pos` is each position (tuple for grid, index for graph).
110 131
111 132
An optional first argument is an agent **type** to be created, and targets mixed agent
112 133
models where the agent constructor cannot be deduced (since it is a union).
@@ -124,7 +145,7 @@
Loading
124 145
    pos::Tuple{Int, Int}
125 146
    temperature::Float64
126 147
end
127 -
space = GridSpace((10, 10), moore = true, periodic = true)
148 +
space = GridSpace((10, 10))
128 149
model = ABM(Union{Daisy, Land}, space)
129 150
temperature(pos) = (pos[1]/10, ) # must be Tuple!
130 151
fill_space!(Land, model, temperature)
@@ -139,9 +160,9 @@
Loading
139 160
    args...;
140 161
    kwargs...,
141 162
) where {A<:AbstractAgent,U<:AbstractAgent}
142 -
    for n in nodes(model)
163 +
    for p in positions(model)
143 164
        id = nextid(model)
144 -
        add_agent_pos!(A(id, n, args...; kwargs...), model)
165 +
        add_agent_pos!(A(id, p, args...; kwargs...), model)
145 166
    end
146 167
    return model
147 168
end
@@ -152,28 +173,27 @@
Loading
152 173
    f::Function;
153 174
    kwargs...,
154 175
) where {A<:AbstractAgent,U<:AbstractAgent}
155 -
    for n in nodes(model)
176 +
    for p in positions(model)
156 177
        id = nextid(model)
157 -
        args = f(n)
158 -
        add_agent_pos!(A(id, n, args...; kwargs...), model)
178 +
        args = f(p)
179 +
        add_agent_pos!(A(id, p, args...; kwargs...), model)
159 180
    end
160 181
    return model
161 182
end
162 183
163 184
"""
164 185
    move_agent_single!(agent::A, model::ABM{A, <:DiscreteSpace}) → agentt
165 186
166 -
Move agent to a random node while respecting a maximum of one agent
167 -
per node. If there are no empty nodes, the agent won't move.
187 +
Move agent to a random position while respecting a maximum of one agent
188 +
per position. If there are no empty positions, the agent won't move.
168 189
"""
169 190
function move_agent_single!(
170 191
        agent::A,
171 192
        model::ABM{A,<:DiscreteSpace},
172 193
    ) where {A<:AbstractAgent}
173 -
    empty_positions = find_empty_nodes(model)
174 -
    if length(empty_positions) > 0
175 -
        random_node = rand(empty_positions)
176 -
        move_agent!(agent, random_node, model)
194 +
    empty = collect(empty_positions(model))
195 +
    if length(empty) > 0
196 +
        move_agent!(agent, rand(empty), model)
177 197
    end
178 198
    return agent
179 199
end

@@ -15,8 +15,9 @@
Loading
15 15
    kill_agents!,
16 16
    genocide!,
17 17
    random_position,
18 -
    node_neighbors,
19 -
    space_neighbors
18 +
    nearby_positions,
19 +
    nearby_ids,
20 +
    nearby_agents
20 21
21 22
notimplemented(model) = error("Not implemented for space type $(nameof(typeof(model.space)))")
22 23
@@ -59,7 +60,7 @@
Loading
59 60
# %% IMPLEMENT: Neighbors and stuff
60 61
#######################################################################################
61 62
"""
62 -
    space_neighbors(position, model::ABM, r=1; kwargs...) → ids
63 +
    nearby_ids(position, model::ABM, r=1; kwargs...) → ids
63 64
64 65
Return an iterable of the ids of the agents within "radius" `r` of the given `position`
65 66
(which must match type with the spatial structure of the `model`).
@@ -74,25 +75,33 @@
Loading
74 75
Keyword arguments are space-specific.
75 76
For `GraphSpace` the keyword `neighbor_type=:default` can be used to select differing
76 77
neighbors depending on the underlying graph directionality type.
77 -
- `:default` returns neighbors of a vertex. If graph is directed, this is equivalent
78 +
- `:default` returns neighbors of a vertex (position). If graph is directed, this is equivalent
78 79
  to `:out`. For undirected graphs, all options are equivalent to `:out`.
79 80
- `:all` returns both `:in` and `:out` neighbors.
80 81
- `:in` returns incoming vertex neighbors.
81 82
- `:out` returns outgoing vertex neighbors.
82 83
"""
83 -
space_neighbors(position, model, r=1) = notimplemented(model)
84 +
nearby_ids(position, model, r=1) = notimplemented(model)
84 85
86 +
"""
87 +
    nearby_agents(agent, model::ABM, args...; kwargs...) -> agent
88 +
89 +
Return an iterable of the agents near the position of the given `agent`.
90 +
91 +
The value of the argument `r` and possible keywords operate identically to [`nearby_ids`](@ref).
92 +
"""
93 +
nearby_agents(a, model, args...; kwargs...) = (model[id] for id in nearby_ids(a, model, args...; kwargs...))
85 94
86 95
"""
87 -
    node_neighbors(position, model::ABM, r=1; kwargs...) → positions
96 +
    nearby_positions(position, model::ABM, r=1; kwargs...) → positions
88 97
89 98
Return an iterable of all positions within "radius" `r` of the given `position`
90 99
(which excludes given `position`).
91 100
The `position` must match type with the spatial structure of the `model`).
92 101
93 -
The value of `r` and possible keywords operate identically to [`space_neighbors`](@ref).
102 +
The value of `r` and possible keywords operate identically to [`nearby_ids`](@ref).
94 103
"""
95 -
node_neighbors(position, model, r=1) = notimplemented(model)
104 +
nearby_positions(position, model, r=1) = notimplemented(model)
96 105
97 106
98 107
@@ -224,7 +233,7 @@
Loading
224 233
225 234
add_agent!(model, 1, 0.5, true) # incorrect: id/pos is set internally
226 235
add_agent!(model, 0.5, true) # correct: w becomes 0.5
227 -
add_agent!(5, model, 0.5, true) # add at node 5, w becomes 0.5
236 +
add_agent!(5, model, 0.5, true) # add at position 5, w becomes 0.5
228 237
add_agent!(model; w = 0.5) # use keywords: w becomes 0.5, k becomes false
229 238
```
230 239
"""
@@ -249,22 +258,21 @@
Loading
249 258
# %% Space agnostic neighbors
250 259
#######################################################################################
251 260
"""
252 -
    space_neighbors(agent::AbstractAgent, model::ABM, r=1)
261 +
    nearby_ids(agent::AbstractAgent, model::ABM, r=1)
253 262
254 -
Same as `space_neighbors(agent.pos, model, r)` but the iterable *excludes* the given
263 +
Same as `nearby_ids(agent.pos, model, r)` but the iterable *excludes* the given
255 264
`agent`'s id.
256 265
"""
257 -
function space_neighbors(agent::A, model::ABM{A}, args...; kwargs...) where {A<:AbstractAgent}
258 -
    all = space_neighbors(agent.pos, model, args...; kwargs...)
259 -
    id::Int = agent.id
260 -
    Iterators.filter(i -> i ≠ id, all)
266 +
function nearby_ids(agent::A, model::ABM{A}, args...; kwargs...) where {A<:AbstractAgent}
267 +
    all = nearby_ids(agent.pos, model, args...; kwargs...)
268 +
    Iterators.filter(i -> i ≠ agent.id, all)
261 269
end
262 270
263 271
"""
264 -
    node_neighbors(agent::AbstractAgent, model::ABM, r=1)
272 +
    nearby_positions(agent::AbstractAgent, model::ABM, r=1)
265 273
266 -
Same as `node_neighbors(agent.pos, model, r)`.
274 +
Same as `nearby_positions(agent.pos, model, r)`.
267 275
"""
268 -
function node_neighbors(agent::A, model::ABM{A}, args...; kwargs...) where {A<:AbstractAgent}
269 -
    node_neighbors(agent.pos, model, args...; kwargs...)
276 +
function nearby_positions(agent::A, model::ABM{A}, args...; kwargs...) where {A<:AbstractAgent}
277 +
    nearby_positions(agent.pos, model, args...; kwargs...)
270 278
end

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 1 files with coverage changes found.

Changes in src/spaces/grid.jl
-1
+2
Loading file...

18 Commits

+1
-1
+2
+1
+1
+2
+2
-1
+1
-8
+2
-10
-3
-3
Hiding 1 contexual commits
Hiding 1 contexual commits
+8
-2
+10
Pull Request Base Commit
Files Coverage
src -0.44% 89.81%
Project Totals (13 files) 89.81%
Loading