def generate_policy(): policy_list = [] def lockdown_fn(time_step): return False policy_list.append(Lockdown_Policy.full_lockdown(lockdown_fn)) def event_restriction_fn(agent, event_info, current_time_step): return False return policy_list, event_restriction_fn
def monday_tuesday_online(): #This function ensures classes are online on Monday and Tuesday policy_list = [] def lockdown_fn(time_step): if time_step % 7 in [1, 3]: return True return False policy_list.append(Lockdown_Policy.full_lockdown(lockdown_fn)) def event_restriction_fn(agent, event_info, current_time_step): return False return policy_list, event_restriction_fn
def mt_no_grade2_wednesday_online(): #This function ensures that there are no grade 1 students on Monday,tuesday and wednesday is online policy_list = [] def lockdown_mt(time_step): if time_step % 7 in [0, 1]: return True return False def lockdown_wednesday(time_step): if time_step % 7 in [2]: return True return False policy_list.append( Lockdown_Policy.agent_lockdown('Grade', ['Grade 1'], lockdown_mt)) policy_list.append(Lockdown_Policy.full_lockdown(lockdown_wednesday)) def event_restriction_fn(agent, event_info, current_time_step): return False return policy_list, event_restriction_fn