projectmesa / mesa-viz-tornado

Apache License 2.0
2 stars 8 forks source link

ChartModule displaying wrong steps with fps=0 (Update) #21

Open homeworksubmission opened 4 years ago

homeworksubmission commented 4 years ago

Describe the bug The steps label in a generated chart starts to display wrong labels when pausing. E.g. It might display steps 3+ when the model is still computing step 1 (as seen from the python console). It also often displays repeated labels such as below. image

Expected behavior The chart should display the correct labels.

To Reproduce Set the fps to 0 and then pause the module after awhile. The issue can be consistently reproduced.

Additional context Setting the fps to 0 is to let the module run as fast as possible. This trick was mentioned by one of the other members and appears to work with SimpleCanvas and BarChart as far as I can tell from my own testing. On a related note, is there a simple way to modify the FPS beyond 20 without directly editing the library files?

homeworksubmission commented 4 years ago

This issue appears occur when using continuous grid. It can be replicated in the boid_flockers model but not in the wolf sheep model.