Hello to everyone!
if i send this,
V, converged, i = newtonpf(Y_bus2, Injection_Vector2, Voltage_Vector2, Slack_Bus_Index, PV_Bus_Index_Array, np.asarray(PQ_Bus_Index_Array), ppopt = None)
i take this:
File "<ipython-input-103-cec7e5ebdab8>", line 1, in <module>
V, converged, i = newtonpf(Y_bus2, Injection_Vector2, Voltage_Vector2, Slack_Bus_Index, PV_Bus_Index_Array, np.asarray(PQ_Bus_Index_Array), ppopt = None)
File "C:\Python27\lib\site-packages\pypower\newtonpf.py", line 88, in newtonpf
dS_dVm, dS_dVa = dSbus_dV(Ybus, V)
File "C:\Python27\lib\site-packages\pypower\dSbus_dV.py", line 63, in dSbus_dV
Ibus = Ybus * asmatrix(V).T
File "C:\Python27\lib\site-packages\numpy\matrixlib\defmatrix.py", line 347, in __rmul__
return N.dot(other, self)
ValueError: shapes (15,15) and (1,15) not aligned: 15 (dim 1) != 1 (dim 0)
Voltage vector is type, ndarray (15,1) so if i transpose with
V, converged, i = newtonpf(Y_bus2, Injection_Vector2, Voltage_Vector2.T, Slack_Bus_Index, PV_Bus_Index_Array, np.asarray(PQ_Bus_Index_Array), ppopt = None)
i take
Traceback (most recent call last):
File "<ipython-input-104-facad8187c25>", line 1, in <module>
V, converged, i = newtonpf(Y_bus2, Injection_Vector2, Voltage_Vector2.T, Slack_Bus_Index, PV_Bus_Index_Array, np.asarray(PQ_Bus_Index_Array), ppopt = None)
File "C:\Python27\lib\site-packages\pypower\newtonpf.py", line 88, in newtonpf
dS_dVm, dS_dVa = dSbus_dV(Ybus, V)
File "C:\Python27\lib\site-packages\pypower\dSbus_dV.py", line 69, in dSbus_dV
dS_dVm = diagV * conj(Ybus * diagVnorm) + conj(diagIbus) * diagVnorm
File "C:\Python27\lib\site-packages\numpy\matrixlib\defmatrix.py", line 347, in __rmul__
return N.dot(other, self)
ValueError: shapes (15,15) and (1,1) not aligned: 15 (dim 1) != 1 (dim 0)
Any help, please?Just for information, PV_Bus_Index_Array is an empty list, and Slack_Bus_Index is an integer.
Thank you,
Christos