-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
JupyterViz questions and proposed enhancements #1772
Description
Hello and thanks for the great library.
I recognize that the JupyterViz is still experimental, but it seems like a great solution for allowing project collaborators to run simulations in Colab notebooks. I have questions about using it and also about submitting a PR with some improvements.
I am having some difficulty customizing the display - it took me a bit to figure out that the agent portrayal for color needs to be lowercase when previously it was uppercase. I haven't yet figured out how to change the size; previously I was using r for radius; I see size in the jupyterviz code but setting that in my agent portrayal doesn't seem to have any effect. I've looked at the code in mesa.experimental.jupyter_viz but I'm not clear on how that's generated; I guess it's part of a matplotlib figure?
I also wanted to use a Select input for a choice parameter and add an output that displays the current step. I have a fork of mesa where I've implemented these - should I open a pull request with these changes to get feedback? (I haven't written any tests or added documentation for the changes yet, but would do if these changes are welcome.)
I'm also interested in adding a reset button similar to the play/stop buttons, but I'm not sure how to programmatically restart the model; currently the only way to reset is to change one of the input parameters.
Another question: when running with jupyterviz, how should I access the model in order to get collected data? I figured out I could get it this way: page.args[0].model.datacollector.get_model_vars_dataframe() — but that doesn't seem ideal!
related issues
- JupyterViz interface should include a step count #1773 / Add step count display to JupyterViz #1775
- JupyterViz should have a reset button similar to the play/stop buttons #1776
- update JupyterViz code to add support for Solara select input and document supported inputs #1777
- JupyterViz grid display should be optional, since not all models use a grid or agent space #1778