/
Agents.jl
101 lines (84 loc) · 2.64 KB
/
Agents.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
module Agents
# Use the README as the module docs
@doc let
path = joinpath(dirname(@__DIR__), "README.md")
include_dependency(path)
read(path, String)
end Agents
using DataFrames
using DataStructures
using Distributed
using Graphs
using DataFrames
using IteratorSampling
using MacroTools
using MixedStructTypes
export MixedStructTypes
import ProgressMeter
using Random
using StaticArrays: SVector
export SVector
import LinearAlgebra
# Core structures of Agents.jl
include("core/agents.jl")
include("core/model_abstract.jl")
include("core/model_free_extensions.jl")
include("core/model_standard.jl")
include("core/model_event_queue.jl")
include("core/model_validation.jl")
include("core/model_accessing_API.jl")
include("core/space_interaction_API.jl")
include("core/higher_order_iteration.jl")
# Existing spaces
include("spaces/nothing.jl")
include("spaces/graph.jl")
include("spaces/grid_general.jl")
include("spaces/grid_multi.jl")
include("spaces/grid_single.jl")
include("spaces/discrete.jl")
include("spaces/continuous.jl")
include("spaces/openstreetmap.jl")
include("spaces/utilities.jl")
include("spaces/walk.jl")
# Stepping and data collection functionality
include("simulations/step.jl")
include("simulations/step_standard.jl")
include("simulations/step_eventqueue.jl")
include("simulations/collect.jl")
include("simulations/paramscan.jl")
include("simulations/sample.jl")
include("simulations/ensemblerun.jl")
# Other features that exist in submodules
include("submodules/pathfinding/Pathfinding.jl")
include("submodules/schedulers.jl")
include("submodules/io/AgentsIO.jl")
# Don't forget to update deprecations between versions!
include("deprecations.jl")
# visualizations (singleton methods for package extension)
include("visualizations.jl")
include("precompile.jl")
# Update messages:
using Scratch
function __init__()
display_update = true
version_number = "6"
update_name = "update_v$(version_number)"
update_message = """
Update message: Agents v$(version_number)
This is a new major version of Agents.jl with lots of cool stuff!
However, from this version onwards, we will stop posting update messages
to the REPL console!
If you want to be updated, follow this discourse post:
https://discourse.julialang.org/t/agents-jl-v6-releases-announcement-post/111678
(and see the CHANGELOG.md file online for a list of changes!)
"""
if display_update
# Get scratch space for this package
versions_dir = @get_scratch!("versions")
if !isfile(joinpath(versions_dir, update_name))
printstyled(stdout, "\n"*update_message; color=:light_magenta)
touch(joinpath(versions_dir, update_name))
end
end
end # _init__ function.
end # module