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
Copy file name to clipboardExpand all lines: examples/Schelling/Readme.md
+5-21Lines changed: 5 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,13 @@
3
3
A simple implementation of a Schelling segregation model.
4
4
5
5
6
-
Implemented here to test / demonstrate several Mesa concepts and features:
7
-
- This version demonstrates the ASCII renderer.
8
-
6
+
Implemented here to test / demonstrate several Mesa concepts and features.
9
7
10
8
### To run this example
11
9
12
-
* Launch the model
13
-
```python
14
-
python Schelling.py
10
+
* Launch the model with the browser visualization:
11
+
```sh
12
+
python SchellingModular.py
15
13
```
16
-
*Visit your browser: http://127.0.0.1:8888/
14
+
*Open your browser to: http://127.0.0.1:8888/
17
15
* In your browser hit *reset*, then *run*
18
-
19
-
20
-
To use with iPython, run this code from the command line, e.g.
21
-
$ ipython -i Schelling.py
22
-
23
-
viz is the visualization wrapper around
24
-
To print the current state of the model:
25
-
viz.render()
26
-
27
-
To advance the model by one step and print the new state:
28
-
viz.step()
29
-
30
-
To advance the model by e.g. 10 steps and print the new state:
0 commit comments