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

SolaraViz: Reset components when params are changed #2240

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

rht
Copy link
Contributor

@rht rht commented Aug 23, 2024

This fixes #2239 (summary can be found in the issue). cc: @DrEntropy.

Currently, using SolaraViz, manipulating the controls to change model_params doesn't change seem to cause a redraw for the space_drawer. (Changing the seed, or advancing one step does redraw with the current parameters). This is most noticeable for network space models, for example virus_on__network. I also note that pressing reset redraws but not with the updated model parameters.

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
Schelling small 🔵 +0.7% [+0.3%, +1.1%] 🔵 +0.7% [+0.2%, +1.2%]
Schelling large 🔵 +0.8% [+0.3%, +1.4%] 🔴 +7.1% [+5.3%, +9.0%]
WolfSheep small 🔵 -1.8% [-3.0%, -0.5%] 🔵 -1.9% [-2.2%, -1.5%]
WolfSheep large 🔵 +0.5% [+0.1%, +0.9%] 🔴 +5.7% [+4.2%, +7.0%]
BoidFlockers small 🔵 +0.1% [-0.5%, +0.6%] 🔵 +2.1% [+1.4%, +2.9%]
BoidFlockers large 🔵 +0.1% [-0.5%, +0.7%] 🔵 +1.6% [+0.8%, +2.5%]

@DrEntropy
Copy link

I verified for my use case this solves the problem. I had not expected it to be a one liner ! Nice.

@rht rht merged commit 0b2d250 into projectmesa:main Aug 25, 2024
12 of 13 checks passed
@rht rht deleted the depend_on_params branch August 25, 2024 09:50
@rht rht added the bug Release notes label label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SolaraViz: visualization should update on parameter changes
3 participants