Skip to content
Merged
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/Ark/Flocking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function flocking_step!(world::World, rng)
entities = buffers.entities
shuffle!(rng, entities)

for entity in entities
@unchecked for entity in entities
pos_comp, vel_comp, param = get_components(world, entity, (Position, Velocity, BirdParams))
pos, vel = pos_comp.p, vel_comp.v

Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Ark = "0.4"
PrettyTables = "2"
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ These are the results of the latest comparison:

| Model/Framework | Agents.jl 6.2.10 | Ark.jl 0.3.2 | MASON 22.0 | Netlogo 6.4.0 | Mesa 3.2.0 |
|:------------------:|:------------------:|:--------------:|:------------:|:---------------:|:------------:|
| WolfSheep-small (Time-Ratio) | 1.0 | **0.39** | 5.29 | 9.94 | 9.38 |
| WolfSheep-large (Time-Ratio) | 1.0 | **0.24** | 7.8 | 4.81 | 3.28 |
| WolfSheep-small (Time-Ratio) | 1.0 | **0.34** | 5.29 | 9.94 | 9.38 |
| WolfSheep-large (Time-Ratio) | 1.0 | **0.14** | 7.8 | 4.81 | 3.28 |
| WolfSheep (Lines of Code) | **73** | 149 | 202 | 137 (871) | 118 |
| Flocking-small (Time-Ratio) | 1.0 | **0.75** | 1.42 | 15.37 | 159.29 |
| Flocking-large (Time-Ratio) | 1.0 | **0.4** | 0.61 | 19.14 | 59.5 |
| Flocking-small (Time-Ratio) | 1.0 | **0.73** | 1.42 | 15.37 | 159.29 |
| Flocking-large (Time-Ratio) | 1.0 | **0.36** | 0.61 | 19.14 | 59.5 |
| Flocking (Lines of Code) | **42** | 137 | 159 | 82 (689) | 94 |
| Schelling-small (Time-Ratio) | 1.0 | **0.67** | 1.19 | 11.39 | 29.73 |
| Schelling-large (Time-Ratio) | 1.0 | **0.68** | 1.51 | 14.33 | 26.66 |
| Schelling-small (Time-Ratio) | 1.0 | **0.61** | 1.19 | 11.39 | 29.73 |
| Schelling-large (Time-Ratio) | 1.0 | **0.59** | 1.51 | 14.33 | 26.66 |
| Schelling (Lines of Code) | **26** | 78 | 129 | 54 (739) | 33 |

## How it works
Expand Down Expand Up @@ -98,3 +98,4 @@ If you are using WSL make sure that you move to a folder inside the subsystem be




2 changes: 1 addition & 1 deletion Schelling/Ark/Schelling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function schelling_step!(world::World, rng)
all_entities = buffers.entities
shuffle!(rng, all_entities)

@inbounds for entity in all_entities
@inbounds @unchecked for entity in all_entities
pos, group = get_components(world, entity, (Position, Group))

count_neighbors_same_group = 0
Expand Down
4 changes: 2 additions & 2 deletions WolfSheep/Ark/WolfSheep.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function swap_remove!(v::Vector{Entity}, x::Entity)
end

function sheep_step!(world::World, rng, entities, params, grass, sheep_grid)
for entity in entities
@unchecked for entity in entities
pos, energy_comp = get_components(world, entity, (Position, Energy))
energy = energy_comp.e

Expand Down Expand Up @@ -118,7 +118,7 @@ function sheep_step!(world::World, rng, entities, params, grass, sheep_grid)
end

function wolf_step!(world::World, rng, entities, params, sheep_grid)
for entity in entities
@unchecked for entity in entities
pos, energy_comp = get_components(world, entity, (Position, Energy))
energy = energy_comp.e

Expand Down