Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gis/GeoSir: Replace BaseScheduler with AgentSet functionality #210

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Sep 25, 2024

Replace BaseScheduler in the GeoSir gis model with AgentSet functionality, using agents_by_type, shuffle_do() and do().

  • Remove BaseScheduler initialization and usage
  • Use automatic agent registration for PersonAgents
  • Explicitly register NeighbourhoodAgents with the model
  • Update step() method to use AgentSet methods for agent activation
  • Maintain original activation order: PersonAgents (shuffled) then NeighbourhoodAgents
  • Remove unnecessary scheduler.add() calls

Closes #209, follows up #207, motivated by projectmesa/mesa#2306, similar to #183 and #202.

CC @glicerico.

- Remove BaseScheduler initialization and usage
- Use automatic agent registration for PersonAgents
- Explicitly register NeighbourhoodAgents with the model
- Update step() method to use AgentSet methods for agent activation
- Maintain original activation order: PersonAgents (shuffled) then NeighbourhoodAgents
- Remove unnecessary scheduler.add() calls
@EwoutH EwoutH requested review from quaquel and wang-boyu September 25, 2024 17:36
@EwoutH EwoutH merged commit 84542d4 into projectmesa:main Sep 25, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace GeoSir scheduler with AgentSet functionality
2 participants