Electricity, Complex Systems, Numerical Analysis, Algorithms, Network.
S=complex(real=P,imaginary=Q_old) delta_S=c() for(i in 1:nrow(Y_eq)){ delta_S[i]=U_0[i]*Conj(I_eq[i])-S[i] } if(sum(delta_S^2)==0){ var=c(Q_old,phi_old) } else{ J=Jacobian(Y_eq[1:(nrow(Y_eq)-1),1:(ncol(Y_eq)-1)],V[1:(nrow(Y_eq)-1)],phi_old[1:(nrow(Y_eq)-1)])