invoking self.running = False doesn't stop simulation

Skip to first unread message

Joe Hancuch

Oct 22, 2020, 7:13:23 PM10/22/20
to ProjectMesa
Hi - I am attempting to kill the simulation right before my agent reaches the end of the grid which is 100 x 200. 

I have self.running = True and when the position of my agent equals to the y coordinate of 195, an if statement changes it to self.running = False. However, my simulation keeps on running and I get the below error message when my agent steps off the board. 

I am not sure why my simulation is not stopping when self.running = False is invoked. I have also included the three files for reproducibility with the important lines highlighted.


Jacqueline Kazil

Nov 1, 2020, 1:21:33 AM11/1/20
to Joe Hancuch, ProjectMesa
It is difficult to review the files because they are rtf and not .py files. 

My guess is something is happening in the execution of the count_type() function. You are passing "Done" as the model? 
It seems to be failing silently. I would add a bunch of print statements to step through where it might be failing. 
Reply all
Reply to author
0 new messages