We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25fadfb commit 4eb166dCopy full SHA for 4eb166d
examples/basic/schelling/analysis.ipynb
@@ -328,7 +328,7 @@
328
" Find the % of agents that only have neighbors of their same type.\n",
329
" \"\"\"\n",
330
" segregated_agents = 0\n",
331
- " for agent in model.agents:\n",
+ " for agent in model.schedule.agents:\n",
332
" segregated = True\n",
333
" for neighbor in model.grid.iter_neighbors(agent.pos, True):\n",
334
" if neighbor.type != agent.type:\n",
0 commit comments