Electricity, Complex Systems, Numerical Analysis, Algorithms, Network.
for Power Flow, condition 1 P=c(0,0,0) Q=c(-.1,-.1,0) S=complex(real=P,imaginary=Q) N=matrix(c(1,0,1,1,1,-1,1,0,0,-1,0,-1,-1,-1,0),ncol=3) Y=complex(imaginary=1)*diag(c(1,1,1,-.5,.5)) The iterative codes: TIME=1000 U_guess=matrix(nrow=TIME,ncol=ncol(N)) U_guess[1,]=c(1,1,0)