code: def _evaluate_mismatch(self, Ybus, V, Sbus, pq, pvpq):
          
          mis = (multiply(V, conj(Ybus * V)) - Sbus) / abs(V)
  
          P = mis[pvpq].real
          Q = mis[pq].imag
  
          return P, Q
docs: Evaluates the mismatch.