def system_reduction_factor(delta_ss, delta_frot, delta_fshear, eta_ss, eta_frot, eta_fshear):
    """
    Calculates the system displacement reduction factor based on the foundation and superstrucutre
    displacement reduction factors.
    :param delta_ss: superstructure displacement
    :param delta_frot: displacement due to foundation rotation
    :param delta_fshear: displacement due to soil-foundation shear deformation
    :param eta_ss: superstructure displacement reduction factor
    :param eta_frot: foundation rotation displacement reduction factor
    :param eta_fshear: soil foundation shear deformation displacement reduction factor
    :return:
    """
    delta_total = delta_ss + delta_frot + delta_fshear
    return (delta_ss * eta_ss + delta_frot * eta_frot + delta_fshear * eta_fshear) / delta_total