Skip to content
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

Schelling #2053

Merged
merged 5 commits into from
Feb 26, 2024
Merged

Schelling #2053

merged 5 commits into from
Feb 26, 2024

Conversation

coderbeta1
Copy link
Contributor

Changes Made:

  1. Seed: Now it is not compulsory to give a seed value (Random runs every time is now possible)
  2. Doc String: Added information about Model Class

@coderbeta1 coderbeta1 marked this pull request as ready for review February 25, 2024 13:31
Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
Schelling small 🔵 +1.5% [+1.1%, +2.0%] 🔵 +0.4% [+0.2%, +0.6%]
Schelling large 🔵 +12.5% [-17.3%, +56.4%] 🔴 +4.5% [+3.4%, +6.0%]
WolfSheep small 🔵 +2.2% [+1.7%, +2.7%] 🔵 +1.1% [+0.9%, +1.3%]
WolfSheep large 🔵 +18.3% [+0.6%, +36.5%] 🔴 +4.2% [+3.2%, +5.1%]
BoidFlockers small 🔵 +0.4% [-0.4%, +1.2%] 🔵 -1.3% [-2.0%, -0.6%]
BoidFlockers large 🔵 -1.1% [-1.4%, -0.7%] 🔵 -1.3% [-2.1%, -0.6%]

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
Schelling small 🔵 -0.2% [-0.6%, +0.1%] 🔵 -0.0% [-0.2%, +0.1%]
Schelling large 🔵 +14.0% [-17.2%, +56.4%] 🔵 +0.3% [-1.1%, +1.8%]
WolfSheep small 🔵 +0.0% [-0.3%, +0.4%] 🔵 +1.4% [+1.3%, +1.6%]
WolfSheep large 🔵 +15.9% [-1.2%, +38.5%] 🔵 +0.9% [+0.3%, +1.7%]
BoidFlockers small 🔵 +1.5% [+1.0%, +2.0%] 🔵 +2.0% [+1.5%, +2.6%]
BoidFlockers large 🔵 +1.3% [+0.9%, +1.6%] 🔵 +1.0% [+0.4%, +1.5%]

@@ -76,8 +93,10 @@ def step(self):
if __name__ == "__main__":
import time

# model = Schelling(15, 40, 40, 3, 1, 0.625)
model = Schelling(15, 100, 100, 8, 2, 0.8)
# model = Schelling(seed=15, height=40, width=40, homophily=3, radius=1, density=0.625)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: should change to width first while we have the chance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@coderbeta1 coderbeta1 requested a review from rht February 26, 2024 11:38
@rht
Copy link
Contributor

rht commented Feb 26, 2024

There are still more in the code that has the height, width order.

@rht rht merged commit 5f155c5 into projectmesa:main Feb 26, 2024
12 checks passed
@rht rht added the maintenance Release notes label label Feb 26, 2024
quaquel pushed a commit to quaquel/mesa that referenced this pull request Apr 9, 2024
* Improve Schelling Model Benchmark

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update schelling.py

* Update schelling.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants