diff --git a/dev/design.html b/dev/design.html index 7c1c9a6..6f0990e 100644 --- a/dev/design.html +++ b/dev/design.html @@ -64,4 +64,4 @@ @control system control(system) "temperature control"
At each step, the solver will call the function () -> control(system)
(a closure is taken at the time when @future
is invoked).
You may schedule additional interactions which exist within a single step of the model; such actions are modeled as named tuples (id, priority=0., call)
. Here, call
is a (parameterless) anonymous function.
They exist within a single step of the model and are executed after the calls to _prestep!
and _step!
finish, in the order of the assigned priorities.
In particular, you may schedule interactions of two kinds:
poke(agent, priority)
, which will translate into a call () -> _interact!(agent)
, with the specified priority,@call opera expresion priority
, which will translate into a call () -> expression
, with the specified priority.# `poke`
poke(agent, 1.) # call `_interact!(agent)`; this call is added to the instantious priority queue with priority 1
# `@call`
bob_agent = only(getagent(agent, r"bob"))
-@call agent wake_up(bob_agent) # translates into `() -> wake_up(bob_agent)` with priority 0
Settings
This document was generated with Documenter.jl version 0.27.25 on Thursday 22 February 2024. Using Julia version 1.10.1.