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 ShutdownCurve(Curve
):
20 """Relationship between the rate in gross active power/minute (Y-axis) at which a unit should be shutdown and its present gross MW output (X-axis)
23 def __init__(self
, shutdownCost
=0.0, shutdownDate
='', ThermalGeneratingUnit
=None, *args
, **kw_args
):
24 """Initialises a new 'ShutdownCurve' instance.
26 @param shutdownCost: Fixed shutdown cost
27 @param shutdownDate: The date and time of the most recent generating unit shutdown
28 @param ThermalGeneratingUnit: A thermal generating unit may have a shutdown curve
30 #: Fixed shutdown cost
31 self
.shutdownCost
= shutdownCost
33 #: The date and time of the most recent generating unit shutdown
34 self
.shutdownDate
= shutdownDate
36 self
._ThermalGeneratingUnit
= None
37 self
.ThermalGeneratingUnit
= ThermalGeneratingUnit
39 super(ShutdownCurve
, self
).__init
__(*args
, **kw_args
)
41 _attrs
= ["shutdownCost", "shutdownDate"]
42 _attr_types
= {"shutdownCost": float, "shutdownDate": str}
43 _defaults
= {"shutdownCost": 0.0, "shutdownDate": ''}
45 _refs
= ["ThermalGeneratingUnit"]
48 def getThermalGeneratingUnit(self
):
49 """A thermal generating unit may have a shutdown curve
51 return self
._ThermalGeneratingUnit
53 def setThermalGeneratingUnit(self
, value
):
54 if self
._ThermalGeneratingUnit
is not None:
55 self
._ThermalGeneratingUnit
._ShutdownCurve
= None
57 self
._ThermalGeneratingUnit
= value
58 if self
._ThermalGeneratingUnit
is not None:
59 self
._ThermalGeneratingUnit
._ShutdownCurve
= self
61 ThermalGeneratingUnit
= property(getThermalGeneratingUnit
, setThermalGeneratingUnit
)