Electricity, Complex Systems, Numerical Analysis, Algorithms, Network.
phi_guess=matrix(nrow=TIME,ncol=ncol(N)) phi_guess[1,]=c(0,0,0) var=c() for(i in 2:TIME){ var=Var(N,Y,P,U,Q_guess[i-1,],phi_guess[i-1,]) Q_guess[i,]=var[1:(length(var)/2)] phi_guess[i,]=var[(length(var)/2+1):length(var)] } The resulting reactive powers for node 1 and node 2 are {-0.08930, -0.10675}