def update_estimated_arrest_probability(self, model):
        cops_in_vision = len([c for c in self.neighbors if c.breed == 'cop'])
        actives_in_vision = 1.  # citizen counts herself
        for c in self.neighbors:
            if (c.breed == 'citizen' and
                    c.condition == 'Active' and
                    c.jail_sentence == 0):
                actives_in_vision += 1
        self.arrest_probability = 1 - math.exp(
            -1 * model.arrest_prob_constant * (
                cops_in_vision / actives_in_vision))
Transform a time value to an object compatible with what is expected
dataset/ETHPy150Open projectmesa/mesa/examples/EpsteinCivilViolence/EpsteinCivilViolence.py/Citizen.update_estimated_arrest_probability--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/backends/__init__.py/BaseDatabaseOperations.value_to_db_time