1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 """Defines constants for named column indices to branch matrix.
18
19 Some examples of usage, after defining the constants using the line above,
20 are::
21
22 branch[3, BR_STATUS] = 0 # take branch 4 out of service
23 Ploss = branch[:, PF] + branch[:, PT] # compute real power loss vector
24
25 The index, name and meaning of each column of the branch matrix is given
26 below:
27
28 columns 0-10 must be included in input matrix (in case file)
29 0. C{F_BUS} from bus number
30 1. C{T_BUS} to bus number
31 2. C{BR_R} resistance (p.u.)
32 3. C{BR_X} reactance (p.u.)
33 4. C{BR_B} total line charging susceptance (p.u.)
34 5. C{RATE_A} MVA rating A (long term rating)
35 6. C{RATE_B} MVA rating B (short term rating)
36 7. C{RATE_C} MVA rating C (emergency rating)
37 8. C{TAP} transformer off nominal turns ratio
38 9. C{SHIFT} transformer phase shift angle (degrees)
39 10. C{BR_STATUS} initial branch status, 1 - in service, 0 - out of service
40 11. C{ANGMIN} minimum angle difference, angle(Vf) - angle(Vt) (degrees)
41 12. C{ANGMAX} maximum angle difference, angle(Vf) - angle(Vt) (degrees)
42
43 columns 13-16 are added to matrix after power flow or OPF solution
44 they are typically not present in the input matrix
45 13. C{PF} real power injected at "from" bus end (MW)
46 14. C{QF} reactive power injected at "from" bus end (MVAr)
47 15. C{PT} real power injected at "to" bus end (MW)
48 16. C{QT} reactive power injected at "to" bus end (MVAr)
49
50 columns 17-18 are added to matrix after OPF solution
51 they are typically not present in the input matrix
52
53 (assume OPF objective function has units, C{u})
54 17. C{MU_SF} Kuhn-Tucker multiplier on MVA limit at "from" bus (u/MVA)
55 18. C{MU_ST} Kuhn-Tucker multiplier on MVA limit at "to" bus (u/MVA)
56
57 columns 19-20 are added to matrix after SCOPF solution
58 they are typically not present in the input matrix
59
60 (assume OPF objective function has units, C{u})
61 19. C{MU_ANGMIN} Kuhn-Tucker multiplier lower angle difference limit
62 20. C{MU_ANGMAX} Kuhn-Tucker multiplier upper angle difference limit
63
64 @author: Ray Zimmerman (PSERC Cornell)
65 @author: Richard Lincoln
66 """
67
68
69 F_BUS = 0
70 T_BUS = 1
71 BR_R = 2
72 BR_X = 3
73 BR_B = 4
74 RATE_A = 5
75 RATE_B = 6
76 RATE_C = 7
77 TAP = 8
78 SHIFT = 9
79 BR_STATUS = 10
80 ANGMIN = 11
81 ANGMAX = 12
82
83
84 PF = 13
85 QF = 14
86 PT = 15
87 QT = 16
88
89
90
91 MU_SF = 17
92 MU_ST = 18
93 MU_ANGMIN = 19
94 MU_ANGMAX = 20
95