1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14
.IEC61970
.Core
.Curve
import Curve
19 class EmissionCurve(Curve
):
20 """Relationship between the unit's emission rate in units of mass per hour (Y-axis) and output active power (X-axis) for a given type of emission. This curve applies when only one type of fuel is being burned.
23 def __init__(self
, emissionType
="chlorine", isNetGrossP
=False, emissionContent
=0.0, ThermalGeneratingUnit
=None, *args
, **kw_args
):
24 """Initialises a new 'EmissionCurve' instance.
26 @param emissionType: The type of emission, which also gives the production rate measurement unit. The y1AxisUnits of the curve contains the unit of measure (e.g. kg) and the emissionType is the type of emission (e.g. sulfer dioxide). Values are: "chlorine", "carbonDioxide", "hydrogenSulfide", "nitrogenOxide", "sulfurDioxide", "carbonDisulfide"
27 @param isNetGrossP: Flag is set to true when output is expressed in net active power
28 @param emissionContent: The emission content per quantity of fuel burned
29 @param ThermalGeneratingUnit: A thermal generating unit may have one or more emission curves
31 #: The type of emission, which also gives the production rate measurement unit. The y1AxisUnits of the curve contains the unit of measure (e.g. kg) and the emissionType is the type of emission (e.g. sulfer dioxide). Values are: "chlorine", "carbonDioxide", "hydrogenSulfide", "nitrogenOxide", "sulfurDioxide", "carbonDisulfide"
32 self
.emissionType
= emissionType
34 #: Flag is set to true when output is expressed in net active power
35 self
.isNetGrossP
= isNetGrossP
37 #: The emission content per quantity of fuel burned
38 self
.emissionContent
= emissionContent
40 self
._ThermalGeneratingUnit
= None
41 self
.ThermalGeneratingUnit
= ThermalGeneratingUnit
43 super(EmissionCurve
, self
).__init
__(*args
, **kw_args
)
45 _attrs
= ["emissionType", "isNetGrossP", "emissionContent"]
46 _attr_types
= {"emissionType": str, "isNetGrossP": bool, "emissionContent": float}
47 _defaults
= {"emissionType": "chlorine", "isNetGrossP": False, "emissionContent": 0.0}
48 _enums
= {"emissionType": "EmissionType"}
49 _refs
= ["ThermalGeneratingUnit"]
52 def getThermalGeneratingUnit(self
):
53 """A thermal generating unit may have one or more emission curves
55 return self
._ThermalGeneratingUnit
57 def setThermalGeneratingUnit(self
, value
):
58 if self
._ThermalGeneratingUnit
is not None:
59 filtered
= [x
for x
in self
.ThermalGeneratingUnit
.EmissionCurves
if x
!= self
]
60 self
._ThermalGeneratingUnit
._EmissionCurves
= filtered
62 self
._ThermalGeneratingUnit
= value
63 if self
._ThermalGeneratingUnit
is not None:
64 self
._ThermalGeneratingUnit
._EmissionCurves
.append(self
)
66 ThermalGeneratingUnit
= property(getThermalGeneratingUnit
, setThermalGeneratingUnit
)