Skip to content

Update examples to use model.time instead of deprecated model.steps#304

Merged
EwoutH merged 2 commits intomainfrom
use_time
Jan 14, 2026
Merged

Update examples to use model.time instead of deprecated model.steps#304
EwoutH merged 2 commits intomainfrom
use_time

Conversation

@EwoutH
Copy link
Copy Markdown
Member

@EwoutH EwoutH commented Jan 14, 2026

Updates example models to use model.time following the deprecation of model.steps in #3136.

Changes:

  • dining_philosophers: Update throughput calculation to use model.time
  • geo_sir: Replace self.steps with self.time
  • rainfall: Update step limit check to use model.time

These changes align the examples with the new API and avoid deprecation warnings.

Related: mesa/mesa#3136

Edit: Mesa-Geo is still using older Mesa version which don't support model.time yet.

Replaces the 'steps' attribute with 'time' in DiningPhilosophersModel, GeoSir, and Rainfall models
@EwoutH EwoutH merged commit 9577811 into main Jan 14, 2026
6 of 8 checks passed
Harshini2411 pushed a commit to Harshini2411/mesa-examples that referenced this pull request Mar 16, 2026
…s` (mesa#304)

Replaces the 'steps' attribute with 'time' in DiningPhilosophersModel and Rainfall models
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.

1 participant