Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Generation / Production / EmissionCurve.py
blobdcfa3cb0f04856e1ae0e109ad118feb7fc9dd07d
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
19 # IN THE SOFTWARE.
21 from CIM14.IEC61970.Core.Curve import Curve
23 class EmissionCurve(Curve):
24 """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.
25 """
27 def __init__(self, emissionType="chlorine", isNetGrossP=False, emissionContent=0.0, ThermalGeneratingUnit=None, *args, **kw_args):
28 """Initialises a new 'EmissionCurve' instance.
30 @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"
31 @param isNetGrossP: Flag is set to true when output is expressed in net active power
32 @param emissionContent: The emission content per quantity of fuel burned
33 @param ThermalGeneratingUnit: A thermal generating unit may have one or more emission curves
34 """
35 #: 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"
36 self.emissionType = emissionType
38 #: Flag is set to true when output is expressed in net active power
39 self.isNetGrossP = isNetGrossP
41 #: The emission content per quantity of fuel burned
42 self.emissionContent = emissionContent
44 self._ThermalGeneratingUnit = None
45 self.ThermalGeneratingUnit = ThermalGeneratingUnit
47 super(EmissionCurve, self).__init__(*args, **kw_args)
49 _attrs = ["emissionType", "isNetGrossP", "emissionContent"]
50 _attr_types = {"emissionType": str, "isNetGrossP": bool, "emissionContent": float}
51 _defaults = {"emissionType": "chlorine", "isNetGrossP": False, "emissionContent": 0.0}
52 _enums = {"emissionType": "EmissionType"}
53 _refs = ["ThermalGeneratingUnit"]
54 _many_refs = []
56 def getThermalGeneratingUnit(self):
57 """A thermal generating unit may have one or more emission curves
58 """
59 return self._ThermalGeneratingUnit
61 def setThermalGeneratingUnit(self, value):
62 if self._ThermalGeneratingUnit is not None:
63 filtered = [x for x in self.ThermalGeneratingUnit.EmissionCurves if x != self]
64 self._ThermalGeneratingUnit._EmissionCurves = filtered
66 self._ThermalGeneratingUnit = value
67 if self._ThermalGeneratingUnit is not None:
68 if self not in self._ThermalGeneratingUnit._EmissionCurves:
69 self._ThermalGeneratingUnit._EmissionCurves.append(self)
71 ThermalGeneratingUnit = property(getThermalGeneratingUnit, setThermalGeneratingUnit)