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 IncrementalHeatRateCurve(Curve
):
20 """Relationship between unit incremental heat rate in (delta energy/time) per (delta active power) and unit output in active power. The IHR curve represents the slope of the HeatInputCurve. Note that the 'incremental heat rate' and the 'heat rate' have the same engineering units.
23 def __init__(self
, isNetGrossP
=False, ThermalGeneratingUnit
=None, *args
, **kw_args
):
24 """Initialises a new 'IncrementalHeatRateCurve' instance.
26 @param isNetGrossP: Flag is set to true when output is expressed in net active power
27 @param ThermalGeneratingUnit: A thermal generating unit may have an incremental heat rate curve
29 #: Flag is set to true when output is expressed in net active power
30 self
.isNetGrossP
= isNetGrossP
32 self
._ThermalGeneratingUnit
= None
33 self
.ThermalGeneratingUnit
= ThermalGeneratingUnit
35 super(IncrementalHeatRateCurve
, self
).__init
__(*args
, **kw_args
)
37 _attrs
= ["isNetGrossP"]
38 _attr_types
= {"isNetGrossP": bool}
39 _defaults
= {"isNetGrossP": False}
41 _refs
= ["ThermalGeneratingUnit"]
44 def getThermalGeneratingUnit(self
):
45 """A thermal generating unit may have an incremental heat rate curve
47 return self
._ThermalGeneratingUnit
49 def setThermalGeneratingUnit(self
, value
):
50 if self
._ThermalGeneratingUnit
is not None:
51 self
._ThermalGeneratingUnit
._IncrementalHeatRateCurve
= None
53 self
._ThermalGeneratingUnit
= value
54 if self
._ThermalGeneratingUnit
is not None:
55 self
._ThermalGeneratingUnit
._IncrementalHeatRateCurve
= self
57 ThermalGeneratingUnit
= property(getThermalGeneratingUnit
, setThermalGeneratingUnit
)