I am using MESA to simulate COVID-19 spread. I want to delete agent that dead but when I run it on the web, the agents never decrease even I set the death rate to 100%.
def condition(self):
self.Infection_time +=1
if self.Infection_time <= self.stage_one:
self.stage = 1
elif self.Infection_time > self.stage_one and self.Infection_time <= self.stage_one+self.stage_two:
self.stage = 2
else:
self.stage = 3
result = 0#rand_pick([0 , 1],[0.1 , 0.9])
if result == 0:
model.schedule.remove(self)
#self.model.kill_agents.append(self)