From what you’ve posted it seems as if you only create your graph once and never change it. Do you ever update model.Social
during your model_step!
function?
Of course we don’t know what your use case/model purpose is, so this is a bit of a wild guess but are you sure you want to use a GridSpace
and then create a graph from the present agents? Perhaps look at our SIR example to see how you can directly use a GraphSpace
instead.
Please note that reading code on screenshots is a bit unpleasant. You might want to consider using backticks ``
to fence your code and allow for nice formatting like this:
using Agents
model = create_model(; dims=(L,L), density)
# and so on