Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Flocking/Agents/Flocking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function flocking_model(rng, extent, n_birds, visual_distance;
speed = 1.0, cohere_factor = 0.03, separation = 1.0, separate_factor = 0.015,
match_factor = 0.05, spacing = visual_distance / 1.5,)
space2d = ContinuousSpace(extent; spacing)
model = StandardABM(Bird, space2d; agent_step!, rng, container = Vector,
model = StandardABM(Bird, space2d; agent_step!, rng, container = StructVector,
scheduler = Schedulers.Randomly())
for n in 1:n_birds
vel = SVector{2}(rand(abmrng(model)) * 2 - 1 for _ in 1:2)
Expand Down
2 changes: 1 addition & 1 deletion Schelling/Agents/Schelling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function schelling_model(rng, numagents, griddims, min_to_be_happy, radius)
space = GridSpaceSingle(griddims, periodic = false)
properties = (min_to_be_happy = min_to_be_happy, radius = radius)
model = StandardABM(SchellingAgent, space; agent_step!, properties, rng,
container = Vector, scheduler = Schedulers.Randomly())
container = StructVector, scheduler = Schedulers.Randomly())
for n in 1:numagents
add_agent_single!(model, false, n < numagents / 2 ? 1 : 2)
end
Expand Down