Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Prepare a listing of all people born on each day -- this is used to
# age people on their birthdays; we start with (2, 29) initialized because
# we need to perform a check every March 1 to ensure that all leap-year babies
# celebrate their birthday that day on non-leap years
self.birthdays = {(2, 29): set()}
# Prepare a number that will hold a single random number that is generated daily -- this
# facilitates certain things that should be determined randomly but remain constant across
# a timestep, e.g., whether a person locked their door before leaving home
self.random_number_this_timestep = random.random()
self.weather = None
# Keep track of some metadata about timesteps that have actually been simulated
self.last_simulated_day = self.ordinal_date
self.n_simulated_timesteps = 0
# Prepare a story recognizer -- this a module whose job is to excavate nuggets of dramatic
# intrigue from the raw emergent material generated by this simulation
self.story_recognizer = StoryRecognizer(simulation=self)