From ad3cad3ac504cd20f228bc56dc9aedab1f67a03f Mon Sep 17 00:00:00 2001 From: rht Date: Mon, 8 Jan 2024 19:03:01 -0500 Subject: [PATCH] Boid flockers: Add Solara viz file --- examples/boid_flockers/app.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 examples/boid_flockers/app.py diff --git a/examples/boid_flockers/app.py b/examples/boid_flockers/app.py new file mode 100644 index 000000000..289d31464 --- /dev/null +++ b/examples/boid_flockers/app.py @@ -0,0 +1,26 @@ +from mesa.experimental import JupyterViz + +from boid_flockers.model import BoidFlockers + + +def boid_draw(agent): + return {"color": "tab:red"} + + +model_params = { + "population": 100, + "width": 100, + "height": 100, + "speed": 5, + "vision": 10, + "separation": 2, +} + +page = JupyterViz( + BoidFlockers, + model_params, + measures=[], + name="BoidFlockers", + agent_portrayal=boid_draw, +) +page # noqa