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

Replace the remaining schedulers with AgentSet functionality #202

Merged
merged 7 commits into from
Sep 21, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Sep 21, 2024

This PR completes the migration from schedulers to AgentSet functionality across the mesa-examples repository for all regular (non-gis/-rl) examples. Key changes include:

  • Replaced RandomActivation, SimultaneousActivation, and RandomActivationByType schedulers with appropriate AgentSet methods
  • Updated Model.step() implementations to use AgentSet activation
  • Removed references to schedule.steps, schedule.agents, and schedule.agents_by_type
  • Updated agent addition/removal logic to work with AgentSets
  • Adjusted data collection and visualization code to use Model.steps and Model.agents

For more details on migrating from schedulers to AgentSets, see the migration guide.

@EwoutH EwoutH marked this pull request as ready for review September 21, 2024 12:16
@EwoutH EwoutH requested review from rht and quaquel September 21, 2024 12:20
@rht
Copy link
Contributor

rht commented Sep 21, 2024

Everything else LGTM.

@EwoutH EwoutH merged commit 8d0c722 into projectmesa:main Sep 21, 2024
1 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.

2 participants