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

JupyterViz: allow customizing the controls/display for a single model, e.g. to display status (running/converged) #1846

Open
rlskoeser opened this issue Oct 24, 2023 · 1 comment

Comments

@rlskoeser
Copy link
Contributor

What's the problem this feature will solve?
In some of my simulations, I have implemented logic to detect when the model has converged and should stop running. I would like some short version of the status and detected convergence value displayed to the user, so that they know explicitly when the model is running or has stopped, and so they have a bit of information about why it stopped.

Describe the solution you'd like
I was thinking that a solara markdown output of a model property wouldn't be too hard to do, and on larger screens there may be space in the same row after the current step count - but I can't figure out an easy way to customize that ModelController. Another option could be an additional row after the controller row.

@rht
Copy link
Contributor

rht commented Nov 6, 2023

There is currently no builtin mechanism to customize components on the left sidebar, but there could be an optional argument to JupyterViz for components that are then rendered in the left sidebar. This should be a few lines of code of implementation.

In the meantime, you could display text derived from the model (in this case, model.running) via how it is done in https://github.com/projectmesa/mesa-examples/blob/10985d44091b9ba1ecebd013d2d2252e2116649b/examples/schelling_experimental/app.py#L5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants