You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@role NeighborhoodRole begin
neighbors::Array{AgentAdress{Any}}end
There are reasons to share this data to other roles who also work on the environment. This can be done with get_model(role, WrapperModel) in setup, then setting the array. However this is boilerplate we might wanna reduce
if we wanna share often used data in roles.
It is desirable to do this declarative, we declare shared data and we declare shared data, e.g.
The @shared would just initialize the Neighbors model with a similar function as get_model(), and remember to assign the instance to the role handler when added to an agent.
The text was updated successfully, but these errors were encountered:
Imagine there is a role holding the neighborhood
There are reasons to share this data to other roles who also work on the environment. This can be done with
get_model(role, WrapperModel)
in setup, then setting the array. However this is boilerplate we might wanna reduceif we wanna share often used data in roles.
It is desirable to do this declarative, we declare shared data and we declare shared data, e.g.
The
@shared
would just initialize the Neighbors model with a similar function as get_model(), and remember to assign the instance to the role handler when added to an agent.The text was updated successfully, but these errors were encountered: