Skip to content

Change model parameters dynamically while the model is running #44

@rajithv

Description

@rajithv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions