Skip to content

Commit c66a6a1

Browse files
committed
Boid flockers: Add Solara viz file
1 parent 31c9a3c commit c66a6a1

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

examples/boid_flockers/app.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from boid_flockers.model import BoidFlockers
2+
from mesa.experimental import JupyterViz
3+
4+
5+
def boid_draw(agent):
6+
return {"color": "tab:red"}
7+
8+
9+
model_params = {
10+
"population": 100,
11+
"width": 100,
12+
"height": 100,
13+
"speed": 5,
14+
"vision": 10,
15+
"separation": 2,
16+
}
17+
18+
page = JupyterViz(
19+
BoidFlockers,
20+
model_params,
21+
measures=[],
22+
name="BoidFlockers",
23+
agent_portrayal=boid_draw,
24+
)
25+
page # noqa

0 commit comments

Comments
 (0)