1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 """Defines constants for named column indices to bus matrix.
18
19 Some examples of usage, after defining the constants using the line above,
20 are::
21
22 Pd = bus[3, PD] # get the real power demand at bus 4
23 bus[:, VMIN] = 0.95 # set the min voltage magnitude to 0.95 at all buses
24
25 The index, name and meaning of each column of the bus matrix is given
26 below:
27
28 columns 0-12 must be included in input matrix (in case file)
29 0. C{BUS_I} bus number (1 to 29997)
30 1. C{BUS_TYPE} bus type (1 = PQ, 2 = PV, 3 = ref, 4 = isolated)
31 2. C{PD} real power demand (MW)
32 3. C{QD} reactive power demand (MVAr)
33 4. C{GS} shunt conductance (MW at V = 1.0 p.u.)
34 5. C{BS} shunt susceptance (MVAr at V = 1.0 p.u.)
35 6. C{BUS_AREA} area number, 1-100
36 7. C{VM} voltage magnitude (p.u.)
37 8. C{VA} voltage angle (degrees)
38 9. C{BASE_KV} base voltage (kV)
39 10. C{ZONE} loss zone (1-999)
40 11. C{VMAX} maximum voltage magnitude (p.u.)
41 12. C{VMIN} minimum voltage magnitude (p.u.)
42
43 columns 13-16 are added to matrix after OPF solution
44 they are typically not present in the input matrix
45
46 (assume OPF objective function has units, u)
47 13. C{LAM_P} Lagrange multiplier on real power mismatch (u/MW)
48 14. C{LAM_Q} Lagrange multiplier on reactive power mismatch (u/MVAr)
49 15. C{MU_VMAX} Kuhn-Tucker multiplier on upper voltage limit (u/p.u.)
50 16. C{MU_VMIN} Kuhn-Tucker multiplier on lower voltage limit (u/p.u.)
51
52 additional constants, used to assign/compare values in the C{BUS_TYPE} column
53 1. C{PQ} PQ bus
54 2. C{PV} PV bus
55 3. C{REF} reference bus
56 4. C{NONE} isolated bus
57
58 @author: Ray Zimmerman (PSERC Cornell)
59 @author: Richard Lincoln
60 """
61
62
63 PQ = 1
64 PV = 2
65 REF = 3
66 NONE = 4
67
68
69 BUS_I = 0
70 BUS_TYPE = 1
71 PD = 2
72 QD = 3
73 GS = 4
74 BS = 5
75 BUS_AREA = 6
76 VM = 7
77 VA = 8
78 BASE_KV = 9
79 ZONE = 10
80 VMAX = 11
81 VMIN = 12
82
83
84
85 LAM_P = 13
86 LAM_Q = 14
87 MU_VMAX = 15
88 MU_VMIN = 16
89