You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is a spin-off of the discussion in #1942 (comment)
Background
Currently, Mesa models require users to explicitly increase the time and step counters using _advance_time(). This approach can be unintuitive and prone to errors, especially for new users. It's also weird to have to use a private method to advance the time.
Motivation
We want to simplify the model creation process and reduce the potential for errors by automatically incrementing time and step counters. This change would make Mesa more user-friendly.
Simultaneously, the time-increase should be able to be overwritten if needed.
The default is time=1 and step=1. Users can change these numbers if they want, but they don't need to. If you want to turn both off, you can just say step(self, time=False, step=False), because in Python, the False is interpreted as 0.
Then we need to have one giant final battle if the time and step increases at the beginning of the step or the end of the step.
Curious what everybody thinks. If anyone has the golden bullet on an implementation idea, please share!
The text was updated successfully, but these errors were encountered:
This issue is a spin-off of the discussion in #1942 (comment)
Background
Currently, Mesa models require users to explicitly increase the time and step counters using
_advance_time()
. This approach can be unintuitive and prone to errors, especially for new users. It's also weird to have to use a private method to advance the time.Motivation
We want to simplify the model creation process and reduce the potential for errors by automatically incrementing time and step counters. This change would make Mesa more user-friendly.
Simultaneously, the time-increase should be able to be overwritten if needed.
API proposal
I would propose the following user interface:
The default is
time=1
andstep=1
. Users can change these numbers if they want, but they don't need to. If you want to turn both off, you can just saystep(self, time=False, step=False)
, because in Python, theFalse
is interpreted as0
.Then we need to have one giant final battle if the time and step increases at the beginning of the step or the end of the step.
Curious what everybody thinks. If anyone has the golden bullet on an implementation idea, please share!
The text was updated successfully, but these errors were encountered: