-
Notifications
You must be signed in to change notification settings - Fork 975
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
Adding grass patches to WolfSheep model #161
Conversation
- adding parameters: grass_regrowth_time - reordering of arguments for WolfSheepPredation model - creating custom activation schedule by breed. This was done in order to emulate the procedures in the original model from netlogo - modifying methods for the case when grass=True - both wolves and sheep can die - they only reproduce if they are still living - added run_model method to show results in console, since I could get the visualization to run
Awesome! Looks pretty good! Just adding a couple notes. Do you want to take a shot at adding the grass to the visualization as well? |
self.running = True | ||
|
||
def step(self): | ||
self.schedule.step() | ||
print([self.schedule.time, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Printing should be optional (e.g. with a verbose
parameter) since otherwise it clutters up the command line during batch runs, visualization, etc. This is fine for debugging, but best practice is probably to use a data collector to keep track of these stats.
Additions made in #169. |
This commit reverts PR #161 projectmesa/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.
This reinstates PR #161 after the previous revert.
This commit reverts PR #161 projectmesa/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.
This reinstates PR #161 after the previous revert.
…lity (projectmesa#170) This commit reverts PR projectmesa#161 projectmesa/mesa-examples#161 That PR assumed that time advancement would be done automatically, like proposed in projectmesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
…lity (projectmesa#170) This commit reverts PR projectmesa#161 projectmesa/mesa-examples#161 That PR assumed that time advancement would be done automatically, like proposed in projectmesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
…onality This reinstates PR projectmesa#161 after the previous revert.
…onality This reinstates PR projectmesa#161 after the previous revert.
This solves #34
I tested this against the netlogo model, and it seems to behave very similarly.