Solves a DC power flow.

def solve(self):
        """ Solves a DC power flow.
        """
        case = self.case
        logger.info("Starting DC power flow [%s]." % case.name)
        t0 = time.time()
        # Update bus indexes.
        self.case.index_buses()

        # Find the index of the refence bus.
        ref_idx = self._get_reference_index(case)
        if ref_idx < 0:
            return False

        # Build the susceptance matrices.
        B, Bsrc, p_businj, p_srcinj = case.Bdc
        # Get the vector of initial voltage angles.
        v_angle_guess = self._get_v_angle_guess(case)
        # Calculate the new voltage phase angles.
        v_angle, p_ref = self._get_v_angle(case, B, v_angle_guess, p_businj,
                                           ref_idx)
        logger.debug("Bus voltage phase angles: \n%s" % v_angle)
        self.v_angle = v_angle

        # Push the results to the case.
        self._update_model(case, B, Bsrc, v_angle, p_srcinj, p_ref, ref_idx)

        logger.info("DC power flow completed in %.3fs." % (time.time() - t0))

        return True