cfr_over_time = np.zeros((num_runs, int(params['T'])))
fraction_over_70_time = np.zeros((num_runs, int(params['T'])))
fraction_below_30_time = np.zeros((num_runs, int(params['T'])))
median_age_time = np.zeros((num_runs, int(params['T'])))
total_infections_time = np.zeros((num_runs, int(params['T'])))
total_documented_time = np.zeros((num_runs, int(params['T'])))
dead_by_age = np.zeros((num_runs, n_ages))
total_deaths_time = np.zeros((num_runs, int(params['T'])))
all_final_s = np.zeros((num_runs, int(params['n'])))
for i in range(num_runs):
    print(i)
    S, E, Mild, Documented, Severe, Critical, R, D, Q, num_infected_by, time_documented, \
    time_to_activation, time_to_death, time_to_recovery, time_critical, time_exposed, \
    num_infected_asympt, age, time_infected, time_to_severe \
        =  run_complete_simulation(seed + i,country, contact_matrix, p_mild_severe, p_severe_critical, \
                                   p_critical_death, mean_time_to_isolate_factor, \
                                   lockdown_factor_age, p_infect_household, fraction_stay_home, params, load_population)

    #This is all for analyzing the age distribution of infection, CFR over time, etc.
    for t in range(T):
        if (time_exposed == t).sum() > 0:
            r_0_over_time[i, t] = num_infected_by[time_exposed == t].mean()
            cfr_over_time[i, t] = D[-1, time_exposed == t].sum() / (
                D[-1, time_exposed == t].sum() +
                R[-1, time_exposed == t].sum())
            fraction_over_70_time[i, t] = (age[time_exposed == t] >= 70).mean()
            fraction_below_30_time[i, t] = (age[time_exposed == t] < 30).mean()
            median_age_time[i, t] = np.median(age[time_exposed == t])
    total_infections_time[i] = (params['n'] - S.sum(axis=1) - E.sum(axis=1))
    total_documented_time[i] = Documented.sum(axis=1)
    for patient_age in range(n_ages):
Mild_per_time = np.zeros((N_SIMS_PER_JOB, T))
Severe_per_time = np.zeros((N_SIMS_PER_JOB, T))
Critical_per_time = np.zeros((N_SIMS_PER_JOB, T))
R_per_time = np.zeros((N_SIMS_PER_JOB, T))
Q_per_time = np.zeros((N_SIMS_PER_JOB, T))

Documented_per_time = np.zeros((N_SIMS_PER_JOB, T))

for i in range(N_SIMS_PER_JOB):

    params['seed'] += 1

    S, E, Mild, Documented, Severe, Critical, R, D, Q, num_infected_by,time_documented, \
    time_to_activation, time_to_death, time_to_recovery, time_critical, time_exposed, num_infected_asympt,\
        age, time_infected, time_to_severe =  run_complete_simulation(int(params['seed']),country, contact_matrix, p_mild_severe, p_severe_critical, \
                                   p_critical_death, mean_time_to_isolate_factor, lockdown_factor_age, p_infect_household, \
                                   fraction_stay_home, params, load_population=load_population)

    infected_per_time[i] = params['n'] - S.sum(axis=1)

    S_per_time[i] = S.sum(axis=1)
    E_per_time[i] = E.sum(axis=1)
    D_per_time[i] = D.sum(axis=1)

    Mild_per_time[i] = Mild.sum(axis=1)
    Severe_per_time[i] = Severe.sum(axis=1)
    Critical_per_time[i] = Critical.sum(axis=1)
    R_per_time[i] = R.sum(axis=1)
    Q_per_time[i] = Q.sum(axis=1)

    r0_total[i] = num_infected_by[np.logical_and(time_exposed <= 20,