1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 from CIM14
.IEC61970
.Generation
.Production
.GeneratingUnit
import GeneratingUnit
23 class ThermalGeneratingUnit(GeneratingUnit
):
24 """A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine.
27 def __init__(self
, oMCost
=0.0, StartupModel
=None, EmmissionAccounts
=None, CombinedCyclePlant
=None, CogenerationPlant
=None, EmissionCurves
=None, HeatRateCurve
=None, ShutdownCurve
=None, IncrementalHeatRateCurve
=None, FuelAllocationSchedules
=None, FossilFuels
=None, HeatInputCurve
=None, CAESPlant
=None, *args
, **kw_args
):
28 """Initialises a new 'ThermalGeneratingUnit' instance.
30 @param oMCost: Operating and maintenance cost for the thermal unit
31 @param StartupModel: A thermal generating unit may have a startup model
32 @param EmmissionAccounts: A thermal generating unit may have one or more emission allowance accounts
33 @param CombinedCyclePlant: A thermal generating unit may be a member of a combined cycle plant
34 @param CogenerationPlant: A thermal generating unit may be a member of a cogeneration plant
35 @param EmissionCurves: A thermal generating unit may have one or more emission curves
36 @param HeatRateCurve: A thermal generating unit may have a heat rate curve
37 @param ShutdownCurve: A thermal generating unit may have a shutdown curve
38 @param IncrementalHeatRateCurve: A thermal generating unit may have an incremental heat rate curve
39 @param FuelAllocationSchedules: A thermal generating unit may have one or more fuel allocation schedules
40 @param FossilFuels: A thermal generating unit may have one or more fossil fuels
41 @param HeatInputCurve: A thermal generating unit may have a heat input curve
42 @param CAESPlant: A thermal generating unit may be a member of a compressed air energy storage plant
44 #: Operating and maintenance cost for the thermal unit
47 self
._StartupModel
= None
48 self
.StartupModel
= StartupModel
50 self
._EmmissionAccounts
= []
51 self
.EmmissionAccounts
= [] if EmmissionAccounts
is None else EmmissionAccounts
53 self
._CombinedCyclePlant
= None
54 self
.CombinedCyclePlant
= CombinedCyclePlant
56 self
._CogenerationPlant
= None
57 self
.CogenerationPlant
= CogenerationPlant
59 self
._EmissionCurves
= []
60 self
.EmissionCurves
= [] if EmissionCurves
is None else EmissionCurves
62 self
._HeatRateCurve
= None
63 self
.HeatRateCurve
= HeatRateCurve
65 self
._ShutdownCurve
= None
66 self
.ShutdownCurve
= ShutdownCurve
68 self
._IncrementalHeatRateCurve
= None
69 self
.IncrementalHeatRateCurve
= IncrementalHeatRateCurve
71 self
._FuelAllocationSchedules
= []
72 self
.FuelAllocationSchedules
= [] if FuelAllocationSchedules
is None else FuelAllocationSchedules
74 self
._FossilFuels
= []
75 self
.FossilFuels
= [] if FossilFuels
is None else FossilFuels
77 self
._HeatInputCurve
= None
78 self
.HeatInputCurve
= HeatInputCurve
80 self
._CAESPlant
= None
81 self
.CAESPlant
= CAESPlant
83 super(ThermalGeneratingUnit
, self
).__init
__(*args
, **kw_args
)
86 _attr_types
= {"oMCost": float}
87 _defaults
= {"oMCost": 0.0}
89 _refs
= ["StartupModel", "EmmissionAccounts", "CombinedCyclePlant", "CogenerationPlant", "EmissionCurves", "HeatRateCurve", "ShutdownCurve", "IncrementalHeatRateCurve", "FuelAllocationSchedules", "FossilFuels", "HeatInputCurve", "CAESPlant"]
90 _many_refs
= ["EmmissionAccounts", "EmissionCurves", "FuelAllocationSchedules", "FossilFuels"]
92 def getStartupModel(self
):
93 """A thermal generating unit may have a startup model
95 return self
._StartupModel
97 def setStartupModel(self
, value
):
98 if self
._StartupModel
is not None:
99 self
._StartupModel
._ThermalGeneratingUnit
= None
101 self
._StartupModel
= value
102 if self
._StartupModel
is not None:
103 self
._StartupModel
.ThermalGeneratingUnit
= None
104 self
._StartupModel
._ThermalGeneratingUnit
= self
106 StartupModel
= property(getStartupModel
, setStartupModel
)
108 def getEmmissionAccounts(self
):
109 """A thermal generating unit may have one or more emission allowance accounts
111 return self
._EmmissionAccounts
113 def setEmmissionAccounts(self
, value
):
114 for x
in self
._EmmissionAccounts
:
115 x
.ThermalGeneratingUnit
= None
117 y
._ThermalGeneratingUnit
= self
118 self
._EmmissionAccounts
= value
120 EmmissionAccounts
= property(getEmmissionAccounts
, setEmmissionAccounts
)
122 def addEmmissionAccounts(self
, *EmmissionAccounts
):
123 for obj
in EmmissionAccounts
:
124 obj
.ThermalGeneratingUnit
= self
126 def removeEmmissionAccounts(self
, *EmmissionAccounts
):
127 for obj
in EmmissionAccounts
:
128 obj
.ThermalGeneratingUnit
= None
130 def getCombinedCyclePlant(self
):
131 """A thermal generating unit may be a member of a combined cycle plant
133 return self
._CombinedCyclePlant
135 def setCombinedCyclePlant(self
, value
):
136 if self
._CombinedCyclePlant
is not None:
137 filtered
= [x
for x
in self
.CombinedCyclePlant
.ThermalGeneratingUnits
if x
!= self
]
138 self
._CombinedCyclePlant
._ThermalGeneratingUnits
= filtered
140 self
._CombinedCyclePlant
= value
141 if self
._CombinedCyclePlant
is not None:
142 if self
not in self
._CombinedCyclePlant
._ThermalGeneratingUnits
:
143 self
._CombinedCyclePlant
._ThermalGeneratingUnits
.append(self
)
145 CombinedCyclePlant
= property(getCombinedCyclePlant
, setCombinedCyclePlant
)
147 def getCogenerationPlant(self
):
148 """A thermal generating unit may be a member of a cogeneration plant
150 return self
._CogenerationPlant
152 def setCogenerationPlant(self
, value
):
153 if self
._CogenerationPlant
is not None:
154 filtered
= [x
for x
in self
.CogenerationPlant
.ThermalGeneratingUnits
if x
!= self
]
155 self
._CogenerationPlant
._ThermalGeneratingUnits
= filtered
157 self
._CogenerationPlant
= value
158 if self
._CogenerationPlant
is not None:
159 if self
not in self
._CogenerationPlant
._ThermalGeneratingUnits
:
160 self
._CogenerationPlant
._ThermalGeneratingUnits
.append(self
)
162 CogenerationPlant
= property(getCogenerationPlant
, setCogenerationPlant
)
164 def getEmissionCurves(self
):
165 """A thermal generating unit may have one or more emission curves
167 return self
._EmissionCurves
169 def setEmissionCurves(self
, value
):
170 for x
in self
._EmissionCurves
:
171 x
.ThermalGeneratingUnit
= None
173 y
._ThermalGeneratingUnit
= self
174 self
._EmissionCurves
= value
176 EmissionCurves
= property(getEmissionCurves
, setEmissionCurves
)
178 def addEmissionCurves(self
, *EmissionCurves
):
179 for obj
in EmissionCurves
:
180 obj
.ThermalGeneratingUnit
= self
182 def removeEmissionCurves(self
, *EmissionCurves
):
183 for obj
in EmissionCurves
:
184 obj
.ThermalGeneratingUnit
= None
186 def getHeatRateCurve(self
):
187 """A thermal generating unit may have a heat rate curve
189 return self
._HeatRateCurve
191 def setHeatRateCurve(self
, value
):
192 if self
._HeatRateCurve
is not None:
193 self
._HeatRateCurve
._ThermalGeneratingUnit
= None
195 self
._HeatRateCurve
= value
196 if self
._HeatRateCurve
is not None:
197 self
._HeatRateCurve
.ThermalGeneratingUnit
= None
198 self
._HeatRateCurve
._ThermalGeneratingUnit
= self
200 HeatRateCurve
= property(getHeatRateCurve
, setHeatRateCurve
)
202 def getShutdownCurve(self
):
203 """A thermal generating unit may have a shutdown curve
205 return self
._ShutdownCurve
207 def setShutdownCurve(self
, value
):
208 if self
._ShutdownCurve
is not None:
209 self
._ShutdownCurve
._ThermalGeneratingUnit
= None
211 self
._ShutdownCurve
= value
212 if self
._ShutdownCurve
is not None:
213 self
._ShutdownCurve
.ThermalGeneratingUnit
= None
214 self
._ShutdownCurve
._ThermalGeneratingUnit
= self
216 ShutdownCurve
= property(getShutdownCurve
, setShutdownCurve
)
218 def getIncrementalHeatRateCurve(self
):
219 """A thermal generating unit may have an incremental heat rate curve
221 return self
._IncrementalHeatRateCurve
223 def setIncrementalHeatRateCurve(self
, value
):
224 if self
._IncrementalHeatRateCurve
is not None:
225 self
._IncrementalHeatRateCurve
._ThermalGeneratingUnit
= None
227 self
._IncrementalHeatRateCurve
= value
228 if self
._IncrementalHeatRateCurve
is not None:
229 self
._IncrementalHeatRateCurve
.ThermalGeneratingUnit
= None
230 self
._IncrementalHeatRateCurve
._ThermalGeneratingUnit
= self
232 IncrementalHeatRateCurve
= property(getIncrementalHeatRateCurve
, setIncrementalHeatRateCurve
)
234 def getFuelAllocationSchedules(self
):
235 """A thermal generating unit may have one or more fuel allocation schedules
237 return self
._FuelAllocationSchedules
239 def setFuelAllocationSchedules(self
, value
):
240 for x
in self
._FuelAllocationSchedules
:
241 x
.ThermalGeneratingUnit
= None
243 y
._ThermalGeneratingUnit
= self
244 self
._FuelAllocationSchedules
= value
246 FuelAllocationSchedules
= property(getFuelAllocationSchedules
, setFuelAllocationSchedules
)
248 def addFuelAllocationSchedules(self
, *FuelAllocationSchedules
):
249 for obj
in FuelAllocationSchedules
:
250 obj
.ThermalGeneratingUnit
= self
252 def removeFuelAllocationSchedules(self
, *FuelAllocationSchedules
):
253 for obj
in FuelAllocationSchedules
:
254 obj
.ThermalGeneratingUnit
= None
256 def getFossilFuels(self
):
257 """A thermal generating unit may have one or more fossil fuels
259 return self
._FossilFuels
261 def setFossilFuels(self
, value
):
262 for x
in self
._FossilFuels
:
263 x
.ThermalGeneratingUnit
= None
265 y
._ThermalGeneratingUnit
= self
266 self
._FossilFuels
= value
268 FossilFuels
= property(getFossilFuels
, setFossilFuels
)
270 def addFossilFuels(self
, *FossilFuels
):
271 for obj
in FossilFuels
:
272 obj
.ThermalGeneratingUnit
= self
274 def removeFossilFuels(self
, *FossilFuels
):
275 for obj
in FossilFuels
:
276 obj
.ThermalGeneratingUnit
= None
278 def getHeatInputCurve(self
):
279 """A thermal generating unit may have a heat input curve
281 return self
._HeatInputCurve
283 def setHeatInputCurve(self
, value
):
284 if self
._HeatInputCurve
is not None:
285 self
._HeatInputCurve
._ThermalGeneratingUnit
= None
287 self
._HeatInputCurve
= value
288 if self
._HeatInputCurve
is not None:
289 self
._HeatInputCurve
.ThermalGeneratingUnit
= None
290 self
._HeatInputCurve
._ThermalGeneratingUnit
= self
292 HeatInputCurve
= property(getHeatInputCurve
, setHeatInputCurve
)
294 def getCAESPlant(self
):
295 """A thermal generating unit may be a member of a compressed air energy storage plant
297 return self
._CAESPlant
299 def setCAESPlant(self
, value
):
300 if self
._CAESPlant
is not None:
301 self
._CAESPlant
._ThermalGeneratingUnit
= None
303 self
._CAESPlant
= value
304 if self
._CAESPlant
is not None:
305 self
._CAESPlant
.ThermalGeneratingUnit
= None
306 self
._CAESPlant
._ThermalGeneratingUnit
= self
308 CAESPlant
= property(getCAESPlant
, setCAESPlant
)