def _calculate_total_dispatchable_mw(case):
    """
    Calculates the total available MW for dispatch. This is equal to the total remaining capacity of all
    in-service, non-swing generators.
    :param case: The :class:`Case` that is synchronized with the current loaded case.
    :type case: :class:`Case`
    :return: The total remaining dispatchable capacity in the case, in MW.
    :rtype: float
    """
    total_dispatchable_mw_max = 0
    swing = case.swing
    for machine in case.machines:
        if machine.status and machine.has_capacity:
            if machine.bus_number != swing.number:
                total_dispatchable_mw_max += machine.max_mw_output
    return total_dispatchable_mw_max