def step(self, model):
        if self.jail_sentence:
            self.jail_sentence -= 1
            return  # no other changes or movements if agent is in jail.
        self.update_neighbors(model)
        self.update_estimated_arrest_probability(model)
        net_risk = self.risk_aversion * self.arrest_probability
        if self.condition == 'Quiescent' and (
                self.grievance - net_risk) > self.threshold:
            self.condition = 'Active'
        elif self.condition == 'Active' and (
                self.grievance - net_risk) <= self.threshold:
            self.condition = 'Quiescent'
        if model.movement and self.empty_neighbors:
            new_pos = random.choice(self.empty_neighbors)
            model.grid.move_agent(self, new_pos)
Decide whether to activate, then move if applicable.
dataset/ETHPy150Open projectmesa/mesa/examples/EpsteinCivilViolence/EpsteinCivilViolence.py/Citizen.step