Skip to content

Commit dd3658e

Browse files
DatserisTortar
andauthored
Remove "experimental" from continuous time (#1111)
Co-authored-by: Adriano Meligrana <[email protected]>
1 parent bde1251 commit dd3658e

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v6.2
2+
3+
The `EventQueueABM` which was previously considered experimental is now considered to be stable.
4+
15
# v6.1
26

37
The `@multiagent` macro introduced in Agents.jl v6.0 has been completely overhauled. We found a better methodology to create performant multi-agent types that can re-use existing agent types. Please read the docstring of the new `@multiagent` and consult the updated tutorial in v6.1 for more details.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Agents"
22
uuid = "46ada45e-f475-11e8-01d0-f70cc89e6671"
33
authors = ["George Datseris", "Tim DuBois", "Aayush Sabharwal", "Ali Vahdati", "Adriano Meligrana"]
4-
version = "6.1.12"
4+
version = "6.2.0"
55

66
[deps]
77
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"

docs/src/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ StandardABM
2424
```@docs
2525
EventQueueABM
2626
AgentEvent
27+
add_event!
2728
```
2829

2930
## Agent types

src/core/model_event_queue.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ end
6363
A concrete implementation of an [`AgentBasedModel`](@ref) which operates in
6464
continuous time, in contrast with the discrete time nature of [`StandardABM`](@ref).
6565
66-
This is still experimental which means that it is subject to breaking changes in the
67-
future. Also, while all the core functionalities have been implemented, this model type
68-
has some more limited features than `StandardABM`: in particular, visualizations and
69-
IO functionalities are incomplete.
70-
7166
Here is a summary of how the time evolution of this model works:
7267
7368
A list of possible events that can be created is provided to the model.
@@ -77,9 +72,8 @@ The events have four pieces of information:
7772
`action!(agent, model)` that will act on the agent corresponding to the event.
7873
Similarly with `agent_step!` for [`StandardABM`](@ref), this function may do anything
7974
and utilize any function from the Agents.jl [API](@ref) or the entire Julia ecosystem.
80-
The `action!` function may spawn new events by using the automatic or the manual
81-
of the [`add_event!`](@ref) function, the default behavior is to generate new events
82-
automatically.
75+
The `action!` function may spawn new events by using [`add_event!`](@ref) function,
76+
however the default behavior is to generate new events automatically, see below.
8377
2. The propensity of the event. A propensity is a concept similar to a probability mass.
8478
When automatically generating a new event for an agent,
8579
first all applicable events for that agent
@@ -101,6 +95,11 @@ based on the propensities as discussed above. Then a time for the new event
10195
is generated and the new event is added back to the queue.
10296
In this way, an event always generates a new event after it has finished its action
10397
(by default; this can be overwritten).
98+
Keep in mind that the scheduling and triggering of events is agnostic to
99+
what the events actually do; even if an event does nothing, it would
100+
still "use up" the agent's time if scheduled. You can avoid this by assigning
101+
propensity 0 to such events in the propensity function,
102+
according to the agent and model state.
104103
105104
`EventQueueABM` is a generalization of "Gillespie"-like simulations, offering
106105
more power and flexibility than a standard Gillespie simulation,
@@ -138,6 +137,11 @@ can be evolved in time.
138137
an agent when the agent is added to the model.
139138
- `autogenerate_after_action::Bool = true`: whether to automatically generate a new
140139
event for an agent after an event affected said agent has been triggered.
140+
141+
142+
!!! warn "No IO yet"
143+
This model does not yet support IO operations such as [`save_checkpoint`](@ref).
144+
Pull Requests that implement this are welcomed!
141145
"""
142146
function EventQueueABM(
143147
::Type{A}, events,

0 commit comments

Comments
 (0)