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

Change model parameters dynamically while the model is running #44

Open
rajithv opened this issue Dec 7, 2023 · 0 comments
Open

Change model parameters dynamically while the model is running #44

rajithv opened this issue Dec 7, 2023 · 0 comments

Comments

@rajithv
Copy link

rajithv commented Dec 7, 2023

What's the problem this feature will solve?
Currently the changing model parameters with UserParams comes into effect when resetting the model. But for some usecases it would be interesting to change the model parameters while the model is in progress. I propose to change model parameters dynamically using UserParams.

Describe the solution you'd like
To ModularServer constructor add an is_dynamic argument.
If is_dynamic is on, when a submit_params message is received, while updating kwargs, also change the currently running model's parameters as well.

Additional context
I do quite a bit a policy modelling, and it's always useful to observe how agent behaviour changes when a policy change comes into effect. I believe this can be easily incorporated by making some simple changes to mesa-viz-tornado code.

I've overridden these for my personal use. If this is something the community would like, I can send through a pull request.

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

1 participant