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
.Core
.PowerSystemResource
import PowerSystemResource
23 class CogenerationPlant(PowerSystemResource
):
24 """A set of thermal generating units for the production of electrical energy and process steam (usually from the output of the steam turbines). The steam sendout is typically used for industrial purposes or for municipal heating and cooling.
27 def __init__(self
, cogenLPSteamRating
=0.0, cogenHPSendoutRating
=0.0, ratedP
=0.0, cogenLPSendoutRating
=0.0, cogenHPSteamRating
=0.0, ThermalGeneratingUnits
=None, SteamSendoutSchedule
=None, *args
, **kw_args
):
28 """Initialises a new 'CogenerationPlant' instance.
30 @param cogenLPSteamRating: The low pressure steam rating
31 @param cogenHPSendoutRating: The high pressure steam sendout
32 @param ratedP: The rated output active power of the cogeneration plant
33 @param cogenLPSendoutRating: The low pressure steam sendout
34 @param cogenHPSteamRating: The high pressure steam rating
35 @param ThermalGeneratingUnits: A thermal generating unit may be a member of a cogeneration plant
36 @param SteamSendoutSchedule: A cogeneration plant has a steam sendout schedule
38 #: The low pressure steam rating
39 self
.cogenLPSteamRating
= cogenLPSteamRating
41 #: The high pressure steam sendout
42 self
.cogenHPSendoutRating
= cogenHPSendoutRating
44 #: The rated output active power of the cogeneration plant
47 #: The low pressure steam sendout
48 self
.cogenLPSendoutRating
= cogenLPSendoutRating
50 #: The high pressure steam rating
51 self
.cogenHPSteamRating
= cogenHPSteamRating
53 self
._ThermalGeneratingUnits
= []
54 self
.ThermalGeneratingUnits
= [] if ThermalGeneratingUnits
is None else ThermalGeneratingUnits
56 self
._SteamSendoutSchedule
= None
57 self
.SteamSendoutSchedule
= SteamSendoutSchedule
59 super(CogenerationPlant
, self
).__init
__(*args
, **kw_args
)
61 _attrs
= ["cogenLPSteamRating", "cogenHPSendoutRating", "ratedP", "cogenLPSendoutRating", "cogenHPSteamRating"]
62 _attr_types
= {"cogenLPSteamRating": float, "cogenHPSendoutRating": float, "ratedP": float, "cogenLPSendoutRating": float, "cogenHPSteamRating": float}
63 _defaults
= {"cogenLPSteamRating": 0.0, "cogenHPSendoutRating": 0.0, "ratedP": 0.0, "cogenLPSendoutRating": 0.0, "cogenHPSteamRating": 0.0}
65 _refs
= ["ThermalGeneratingUnits", "SteamSendoutSchedule"]
66 _many_refs
= ["ThermalGeneratingUnits"]
68 def getThermalGeneratingUnits(self
):
69 """A thermal generating unit may be a member of a cogeneration plant
71 return self
._ThermalGeneratingUnits
73 def setThermalGeneratingUnits(self
, value
):
74 for x
in self
._ThermalGeneratingUnits
:
75 x
.CogenerationPlant
= None
77 y
._CogenerationPlant
= self
78 self
._ThermalGeneratingUnits
= value
80 ThermalGeneratingUnits
= property(getThermalGeneratingUnits
, setThermalGeneratingUnits
)
82 def addThermalGeneratingUnits(self
, *ThermalGeneratingUnits
):
83 for obj
in ThermalGeneratingUnits
:
84 obj
.CogenerationPlant
= self
86 def removeThermalGeneratingUnits(self
, *ThermalGeneratingUnits
):
87 for obj
in ThermalGeneratingUnits
:
88 obj
.CogenerationPlant
= None
90 def getSteamSendoutSchedule(self
):
91 """A cogeneration plant has a steam sendout schedule
93 return self
._SteamSendoutSchedule
95 def setSteamSendoutSchedule(self
, value
):
96 if self
._SteamSendoutSchedule
is not None:
97 self
._SteamSendoutSchedule
._CogenerationPlant
= None
99 self
._SteamSendoutSchedule
= value
100 if self
._SteamSendoutSchedule
is not None:
101 self
._SteamSendoutSchedule
.CogenerationPlant
= None
102 self
._SteamSendoutSchedule
._CogenerationPlant
= self
104 SteamSendoutSchedule
= property(getSteamSendoutSchedule
, setSteamSendoutSchedule
)