Reinstate PR #161: Replace schedulers with AgentSet functionality #183
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reinstates PR #161 after the previous revert in #170.
Now that projectmesa/mesa#2223 is merged, these examples are fully functional again without schedulers.
Original description of #161 below.
This PR replace all the
RandomActivation
andSimultaneousActivation
schedulers used in the example models with AgentSet functionality. This simplifies models and allows for easier and more flexible modification of these models. It algins the examples with the current best practices in Mesa.RandomActivation
The RandomActivation schedulers were removed, and in the Model.step() function the schedule step was replaced with an AgentSet operation, like:
The following RandomActivation schedulers were removed:
SimultaneousActivation
To remove the SimultaneousActivation schedulers, the Agent methods were renamed from
step()
andadvance()
to more descriptive functions. The model step was updated accordingly:The following SimultaneousActivation schedulers were removed:
Relevant tickets
steps
counter mesa#2223