Package pypower :: Module case9Q
[hide private]
[frames] | no frames]

Source Code for Module pypower.case9Q

 1  # Copyright (C) 1996-2011 Power System Engineering Research Center (PSERC) 
 2  # Copyright (C) 2011 Richard Lincoln 
 3  # 
 4  # PYPOWER is free software: you can redistribute it and/or modify 
 5  # it under the terms of the GNU General Public License as published 
 6  # by the Free Software Foundation, either version 3 of the License, 
 7  # or (at your option) any later version. 
 8  # 
 9  # PYPOWER is distributed in the hope that it will be useful, 
10  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
12  # GNU General Public License for more details. 
13  # 
14  # You should have received a copy of the GNU General Public License 
15  # along with PYPOWER. If not, see <http://www.gnu.org/licenses/>. 
16   
17  """Power flow data for 9 bus, 3 generator case. 
18  """ 
19   
20  from numpy import array 
21   
22 -def case9Q():
23 """Power flow data for 9 bus, 3 generator case. 24 Please see L{caseformat} for details on the case file format. 25 26 Identical to L{case9}, with the addition of non-zero costs for 27 reactive power. 28 29 @return: Power flow data for 9 bus, 3 generator case. 30 """ 31 ppc = {"version": '2'} 32 33 ##----- Power Flow Data -----## 34 ## system MVA base 35 ppc["baseMVA"] = 100.0 36 37 ## bus data 38 # bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin 39 ppc["bus"] = array([ 40 [1, 3, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 41 [2, 2, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 42 [3, 2, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 43 [4, 1, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 44 [5, 1, 90, 30, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 45 [6, 1, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 46 [7, 1, 100, 35, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 47 [8, 1, 0, 0, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9], 48 [9, 1, 125, 50, 0, 0, 1, 1, 0, 345, 1, 1.1, 0.9] 49 ]) 50 51 ## generator data 52 # bus, Pg, Qg, Qmax, Qmin, Vg, mBase, status, Pmax, Pmin, Pc1, Pc2, 53 # Qc1min, Qc1max, Qc2min, Qc2max, ramp_agc, ramp_10, ramp_30, ramp_q, apf 54 ppc["gen"] = array([ 55 [1, 0, 0, 300, -300, 1, 100, 1, 250, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 56 [2, 163, 0, 300, -300, 1, 100, 1, 300, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 57 [3, 85, 0, 300, -300, 1, 100, 1, 270, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 58 ]) 59 60 ## branch data 61 # fbus, tbus, r, x, b, rateA, rateB, rateC, ratio, angle, status, angmin, angmax 62 ppc["branch"] = array([ 63 [1, 4, 0, 0.0576, 0, 250, 250, 250, 0, 0, 1, -360, 360], 64 [4, 5, 0.017, 0.092, 0.158, 250, 250, 250, 0, 0, 1, -360, 360], 65 [5, 6, 0.039, 0.17, 0.358, 150, 150, 150, 0, 0, 1, -360, 360], 66 [3, 6, 0, 0.0586, 0, 300, 300, 300, 0, 0, 1, -360, 360], 67 [6, 7, 0.0119, 0.1008, 0.209, 150, 150, 150, 0, 0, 1, -360, 360], 68 [7, 8, 0.0085, 0.072, 0.149, 250, 250, 250, 0, 0, 1, -360, 360], 69 [8, 2, 0, 0.0625, 0, 250, 250, 250, 0, 0, 1, -360, 360], 70 [8, 9, 0.032, 0.161, 0.306, 250, 250, 250, 0, 0, 1, -360, 360], 71 [9, 4, 0.01, 0.085, 0.176, 250, 250, 250, 0, 0, 1, -360, 360] 72 ]) 73 74 ##----- OPF Data -----## 75 ## area data 76 # area refbus 77 ppc["areas"] = array([ 78 [1, 5] 79 ]) 80 81 ## generator cost data 82 # 1 startup shutdown n x1 y1 ... xn yn 83 # 2 startup shutdown n c(n-1) ... c0 84 ppc["gencost"] = array([ 85 [2, 1500, 0, 3, 0.11, 5, 150], 86 [2, 2000, 0, 3, 0.085, 1.2, 600], 87 [2, 3000, 0, 3, 0.1225, 1, 335], 88 [2, 0, 0, 3, 0.2, 0, 0], 89 [2, 0, 0, 3, 0.05, 0, 0], 90 [2, 0, 0, 3, 0.3, 0, 0], 91 ]) 92 93 return ppc
94