Conversation
Member
Author
|
And believe it or not, the final error is the DataCollector that tries to gather attributes from agents that don't have said attributes. |
0f572c8 to
3d94b69
Compare
Replace all usages of model.schedule.agents with the use of the model.agents AgentSet in all examples.
Replace the old RandomActivation scheduler with AgentSet functionality. self.agents.shuffle.do("step") is equivalent and self.schedule.step() with an RandomActivation scheduler, and model behavior should not change.
The SimultaneousActivation scheduler used a "step" and "advanced" function in the Agent. These have been renamed for each model to be more descriptive (like "determine_state" and "assume_state"), and then the model step was replace by something like:
self.agents.do("determine_state")
self.agents.do("assume_state")
Docstring was also updated accordingly.
Schedulers don't exist anymore, so we don't need to add agents anymore. Agents are automatically added to model.agents on Agent initialisation.
These models use complex schedulers which warrant an separate PR.
It doesn't have a step function and there is only one, so it shouldn't be an Agent, just an Python object.
f1cf42b to
bd60c41
Compare
Member
Author
|
I updated the PR description and title and cleaned up the commit history as far as feasible. Looking forward to reviews! |
rht
reviewed
Aug 18, 2024
rht
reviewed
Aug 18, 2024
Contributor
|
Other than the 2 comments, everything else LGTM. Feel free to rebase and merge after they had been addressed. |
fa1aee4 to
ffa0958
Compare
rht
approved these changes
Aug 18, 2024
9 tasks
Member
Author
|
With rht’s approval I’m going to merge this. @jackiekazil and @tpike3 I would still love your take, if you have any feedback let me know. |
This was referenced Aug 21, 2024
EwoutH
added a commit
to EwoutH/mesa-examples
that referenced
this pull request
Aug 22, 2024
This commit reverts PR mesa#161 mesa#161 That PR assumed that time advancement would be done automatically, like proposed in mesa/mesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
EwoutH
added a commit
that referenced
this pull request
Aug 22, 2024
This commit reverts PR #161 #161 That PR assumed that time advancement would be done automatically, like proposed in mesa/mesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
EwoutH
added a commit
to EwoutH/mesa-examples
that referenced
this pull request
Aug 30, 2024
This reinstates PR mesa#161 after the previous revert.
EwoutH
added a commit
to EwoutH/mesa-examples
that referenced
this pull request
Aug 30, 2024
This reinstates PR mesa#161 after the previous revert.
EwoutH
added a commit
to EwoutH/mesa-examples
that referenced
this pull request
Aug 30, 2024
This reinstates PR mesa#161 after the previous revert.
EwoutH
added a commit
to EwoutH/mesa-examples
that referenced
this pull request
Sep 20, 2024
This reinstates PR mesa#161 after the previous revert.
EwoutH
added a commit
to mesa/mesa
that referenced
this pull request
Oct 12, 2024
This commit reverts PR #161 mesa/mesa-examples#161 That PR assumed that time advancement would be done automatically, like proposed in #2223 We encountered some underlying issues with time, which we couldn't resolve in time.
EwoutH
added a commit
to mesa/mesa
that referenced
this pull request
Oct 12, 2024
This commit reverts PR #161 mesa/mesa-examples#161 That PR assumed that time advancement would be done automatically, like proposed in #2223 We encountered some underlying issues with time, which we couldn't resolve in time.
EwoutH
added a commit
to EwoutH/mesa
that referenced
this pull request
Oct 15, 2024
…esa#170) This commit reverts PR mesa#161 mesa/mesa-examples#161 That PR assumed that time advancement would be done automatically, like proposed in mesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
EwoutH
added a commit
to EwoutH/mesa
that referenced
this pull request
Oct 15, 2024
…esa#170) This commit reverts PR mesa#161 mesa/mesa-examples#161 That PR assumed that time advancement would be done automatically, like proposed in mesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
Harshini2411
pushed a commit
to Harshini2411/mesa-examples
that referenced
this pull request
Mar 16, 2026
…esa#170) This commit reverts PR mesa#161 mesa#161 That PR assumed that time advancement would be done automatically, like proposed in mesa/mesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
Harshini2411
pushed a commit
to Harshini2411/mesa-examples
that referenced
this pull request
Mar 16, 2026
This reinstates PR mesa#161 after the previous revert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR replace all the
RandomActivationandSimultaneousActivationschedulers 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 (b7f67c7)
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 (7e396fe)
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