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

Source Code for Module pypower.case30pwl

  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  """Case 30 with piece-wise linear generator costs. 
 18  """ 
 19   
 20  from numpy import array 
 21   
22 -def case30pwl():
23 """Case 30 with piece-wise linear generator costs. 24 Please see L{caseformat} for details on the case file format. 25 26 Identical to L{case30}, except with piece-wise linear generator costs. 27 28 @return: Case 30 with piece-wise linear generator costs. 29 """ 30 ppc = {"version": '2'} 31 32 ##----- Power Flow Data -----## 33 ## system MVA base 34 ppc["baseMVA"] = 100.0 35 36 ## bus data 37 # bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin 38 ppc["bus"] = array([ 39 [1, 3, 0, 0, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 40 [2, 2, 21.7, 12.7, 0, 0, 1, 1, 0, 135, 1, 1.1, 0.95], 41 [3, 1, 2.4, 1.2, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 42 [4, 1, 7.6, 1.6, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 43 [5, 1, 0, 0, 0, 0.19, 1, 1, 0, 135, 1, 1.05, 0.95], 44 [6, 1, 0, 0, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 45 [7, 1, 22.8, 10.9, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 46 [8, 1, 30, 30, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 47 [9, 1, 0, 0, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 48 [10, 1, 5.8, 2, 0, 0, 3, 1, 0, 135, 1, 1.05, 0.95], 49 [11, 1, 0, 0, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 50 [12, 1, 11.2, 7.5, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 51 [13, 2, 0, 0, 0, 0, 2, 1, 0, 135, 1, 1.1, 0.95], 52 [14, 1, 6.2, 1.6, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 53 [15, 1, 8.2, 2.5, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 54 [16, 1, 3.5, 1.8, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 55 [17, 1, 9, 5.8, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 56 [18, 1, 3.2, 0.9, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 57 [19, 1, 9.5, 3.4, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 58 [20, 1, 2.2, 0.7, 0, 0, 2, 1, 0, 135, 1, 1.05, 0.95], 59 [21, 1, 17.5, 11.2, 0, 0, 3, 1, 0, 135, 1, 1.05, 0.95], 60 [22, 2, 0, 0, 0, 0, 3, 1, 0, 135, 1, 1.1, 0.95], 61 [23, 2, 3.2, 1.6, 0, 0, 2, 1, 0, 135, 1, 1.1, 0.95], 62 [24, 1, 8.7, 6.7, 0, 0.04, 3, 1, 0, 135, 1, 1.05, 0.95], 63 [25, 1, 0, 0, 0, 0, 3, 1, 0, 135, 1, 1.05, 0.95], 64 [26, 1, 3.5, 2.3, 0, 0, 3, 1, 0, 135, 1, 1.05, 0.95], 65 [27, 2, 0, 0, 0, 0, 3, 1, 0, 135, 1, 1.1, 0.95], 66 [28, 1, 0, 0, 0, 0, 1, 1, 0, 135, 1, 1.05, 0.95], 67 [29, 1, 2.4, 0.9, 0, 0, 3, 1, 0, 135, 1, 1.05, 0.95], 68 [30, 1, 10.6, 1.9, 0, 0, 3, 1, 0, 135, 1, 1.05, 0.95] 69 ]) 70 71 ## generator data 72 # bus, Pg, Qg, Qmax, Qmin, Vg, mBase, status, Pmax, Pmin, Pc1, Pc2, 73 # Qc1min, Qc1max, Qc2min, Qc2max, ramp_agc, ramp_10, ramp_30, ramp_q, apf 74 ppc["gen"] = array([ 75 [1, 23.54, 0, 150, -20, 1, 100, 1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 76 [2, 60.97, 0, 60, -20, 1, 100, 1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 77 [22, 21.59, 0, 62.5, -15, 1, 100, 1, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 78 [27, 26.91, 0, 48.7, -15, 1, 100, 1, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 79 [23, 19.2, 0, 40, -10, 1, 100, 1, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 80 [13, 37, 0, 44.7, -15, 1, 100, 1, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 81 ]) 82 83 ## branch data 84 # fbus, tbus, r, x, b, rateA, rateB, rateC, ratio, angle, status, angmin, angmax 85 ppc["branch"] = array([ 86 [1, 2, 0.02, 0.06, 0.03, 130, 130, 130, 0, 0, 1, -360, 360], 87 [1, 3, 0.05, 0.19, 0.02, 130, 130, 130, 0, 0, 1, -360, 360], 88 [2, 4, 0.06, 0.17, 0.02, 65, 65, 65, 0, 0, 1, -360, 360], 89 [3, 4, 0.01, 0.04, 0, 130, 130, 130, 0, 0, 1, -360, 360], 90 [2, 5, 0.05, 0.2, 0.02, 130, 130, 130, 0, 0, 1, -360, 360], 91 [2, 6, 0.06, 0.18, 0.02, 65, 65, 65, 0, 0, 1, -360, 360], 92 [4, 6, 0.01, 0.04, 0, 90, 90, 90, 0, 0, 1, -360, 360], 93 [5, 7, 0.05, 0.12, 0.01, 70, 70, 70, 0, 0, 1, -360, 360], 94 [6, 7, 0.03, 0.08, 0.01, 130, 130, 130, 0, 0, 1, -360, 360], 95 [6, 8, 0.01, 0.04, 0, 32, 32, 32, 0, 0, 1, -360, 360], 96 [6, 9, 0, 0.21, 0, 65, 65, 65, 0, 0, 1, -360, 360], 97 [6, 10, 0, 0.56, 0, 32, 32, 32, 0, 0, 1, -360, 360], 98 [9, 11, 0, 0.21, 0, 65, 65, 65, 0, 0, 1, -360, 360], 99 [9, 10, 0, 0.11, 0, 65, 65, 65, 0, 0, 1, -360, 360], 100 [4, 12, 0, 0.26, 0, 65, 65, 65, 0, 0, 1, -360, 360], 101 [12, 13, 0, 0.14, 0, 65, 65, 65, 0, 0, 1, -360, 360], 102 [12, 14, 0.12, 0.26, 0, 32, 32, 32, 0, 0, 1, -360, 360], 103 [12, 15, 0.07, 0.13, 0, 32, 32, 32, 0, 0, 1, -360, 360], 104 [12, 16, 0.09, 0.2, 0, 32, 32, 32, 0, 0, 1, -360, 360], 105 [14, 15, 0.22, 0.2, 0, 16, 16, 16, 0, 0, 1, -360, 360], 106 [16, 17, 0.08, 0.19, 0, 16, 16, 16, 0, 0, 1, -360, 360], 107 [15, 18, 0.11, 0.22, 0, 16, 16, 16, 0, 0, 1, -360, 360], 108 [18, 19, 0.06, 0.13, 0, 16, 16, 16, 0, 0, 1, -360, 360], 109 [19, 20, 0.03, 0.07, 0, 32, 32, 32, 0, 0, 1, -360, 360], 110 [10, 20, 0.09, 0.21, 0, 32, 32, 32, 0, 0, 1, -360, 360], 111 [10, 17, 0.03, 0.08, 0, 32, 32, 32, 0, 0, 1, -360, 360], 112 [10, 21, 0.03, 0.07, 0, 32, 32, 32, 0, 0, 1, -360, 360], 113 [10, 22, 0.07, 0.15, 0, 32, 32, 32, 0, 0, 1, -360, 360], 114 [21, 22, 0.01, 0.02, 0, 32, 32, 32, 0, 0, 1, -360, 360], 115 [15, 23, 0.1, 0.2, 0, 16, 16, 16, 0, 0, 1, -360, 360], 116 [22, 24, 0.12, 0.18, 0, 16, 16, 16, 0, 0, 1, -360, 360], 117 [23, 24, 0.13, 0.27, 0, 16, 16, 16, 0, 0, 1, -360, 360], 118 [24, 25, 0.19, 0.33, 0, 16, 16, 16, 0, 0, 1, -360, 360], 119 [25, 26, 0.25, 0.38, 0, 16, 16, 16, 0, 0, 1, -360, 360], 120 [25, 27, 0.11, 0.21, 0, 16, 16, 16, 0, 0, 1, -360, 360], 121 [28, 27, 0, 0.4, 0, 65, 65, 65, 0, 0, 1, -360, 360], 122 [27, 29, 0.22, 0.42, 0, 16, 16, 16, 0, 0, 1, -360, 360], 123 [27, 30, 0.32, 0.6, 0, 16, 16, 16, 0, 0, 1, -360, 360], 124 [29, 30, 0.24, 0.45, 0, 16, 16, 16, 0, 0, 1, -360, 360], 125 [8, 28, 0.06, 0.2, 0.02, 32, 32, 32, 0, 0, 1, -360, 360], 126 [6, 28, 0.02, 0.06, 0.01, 32, 32, 32, 0, 0, 1, -360, 360] 127 ]) 128 129 ##----- OPF Data -----## 130 ## area data 131 # area refbus 132 ppc["areas"] = array([ 133 [1, 8], 134 [2, 23], 135 [3, 26], 136 ]) 137 138 ## generator cost data 139 # 1 startup shutdown n x1 y1 ... xn yn 140 # 2 startup shutdown n c(n-1) ... c0 141 ppc["gencost"] = array([ 142 [1, 0, 0, 4, 0, 0, 12, 144, 36, 1008, 60, 2832], 143 [1, 0, 0, 4, 0, 0, 12, 240, 36, 1296, 60, 3312], 144 [1, 0, 0, 4, 0, 0, 12, 240, 36, 1296, 60, 3312], 145 [1, 0, 0, 4, 0, 0, 12, 144, 36, 1008, 60, 2832], 146 [1, 0, 0, 4, 0, 0, 12, 240, 36, 1296, 60, 3312], 147 [1, 0, 0, 4, 0, 0, 12, 144, 36, 1008, 60, 2832] 148 ]) 149 150 return ppc
151