def A_tot_wkend_days_init(M, i, t, e):
    """
    Initialize number of weekend days worked in the i'th pattern, tour type t,
    and weekend type e.

    :param M: Model
    :param i: weekend worked pattern
    :param t: tour type
    :param e: weekend type (1=Sun and Sat, 2=Fri and Sat)
    :return: number of weekend days worked over entire schedule cycle (int)
    """

    if e == 1:
        return sum(M.A_wkend_days[i, 1, w, t, e] + M.A_wkend_days[i, 7, w, t, e] for w in M.WEEKS)
    else:
        return sum(M.A_wkend_days[i, 6, w, t, e] + M.A_wkend_days[i, 7, w, t, e] for w in M.WEEKS)