def TTD_TTDS_rule(M, i, j, w, t):
    """
    Coordinate TourTypeDayShift and TourTypeDay variables for each day of each week

    :param M: Model
    :param i: window
    :param j: day
    :param w: week
    :param t: tour type
    :return: Constraint rule
    """

    return sum(M.TourTypeDayShift[i, t, k, j, w]
               for k in M.tt_length_x[t] if (i, t, k, j) in M.okTourTypeDayShift) == M.TourTypeDay[i, t, j, w]