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 HydroPump(PowerSystemResource
):
24 """A synchronous motor-driven pump, typically associated with a pumped storage plant
27 def __init__(self
, pumpPowerAtMaxHead
=0.0, pumpPowerAtMinHead
=0.0, pumpDischAtMinHead
=0.0, pumpDischAtMaxHead
=0.0, SynchronousMachine
=None, HydroPumpOpSchedule
=None, HydroPowerPlant
=None, *args
, **kw_args
):
28 """Initialises a new 'HydroPump' instance.
30 @param pumpPowerAtMaxHead: The pumping power under maximum head conditions, usually at full gate
31 @param pumpPowerAtMinHead: The pumping power under minimum head conditions, usually at full gate.
32 @param pumpDischAtMinHead: The pumping discharge (m3/sec) under minimum head conditions, usually at full gate
33 @param pumpDischAtMaxHead: The pumping discharge (m3/sec) under maximum head conditions, usually at full gate
34 @param SynchronousMachine: The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating.
35 @param HydroPumpOpSchedule: The hydro pump has a pumping schedule over time, indicating when pumping is to occur.
36 @param HydroPowerPlant: The hydro pump may be a member of a pumped storage plant or a pump for distributing water
38 #: The pumping power under maximum head conditions, usually at full gate
39 self
.pumpPowerAtMaxHead
= pumpPowerAtMaxHead
41 #: The pumping power under minimum head conditions, usually at full gate.
42 self
.pumpPowerAtMinHead
= pumpPowerAtMinHead
44 #: The pumping discharge (m3/sec) under minimum head conditions, usually at full gate
45 self
.pumpDischAtMinHead
= pumpDischAtMinHead
47 #: The pumping discharge (m3/sec) under maximum head conditions, usually at full gate
48 self
.pumpDischAtMaxHead
= pumpDischAtMaxHead
50 self
._SynchronousMachine
= None
51 self
.SynchronousMachine
= SynchronousMachine
53 self
._HydroPumpOpSchedule
= None
54 self
.HydroPumpOpSchedule
= HydroPumpOpSchedule
56 self
._HydroPowerPlant
= None
57 self
.HydroPowerPlant
= HydroPowerPlant
59 super(HydroPump
, self
).__init
__(*args
, **kw_args
)
61 _attrs
= ["pumpPowerAtMaxHead", "pumpPowerAtMinHead", "pumpDischAtMinHead", "pumpDischAtMaxHead"]
62 _attr_types
= {"pumpPowerAtMaxHead": float, "pumpPowerAtMinHead": float, "pumpDischAtMinHead": float, "pumpDischAtMaxHead": float}
63 _defaults
= {"pumpPowerAtMaxHead": 0.0, "pumpPowerAtMinHead": 0.0, "pumpDischAtMinHead": 0.0, "pumpDischAtMaxHead": 0.0}
65 _refs
= ["SynchronousMachine", "HydroPumpOpSchedule", "HydroPowerPlant"]
68 def getSynchronousMachine(self
):
69 """The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating.
71 return self
._SynchronousMachine
73 def setSynchronousMachine(self
, value
):
74 if self
._SynchronousMachine
is not None:
75 self
._SynchronousMachine
._HydroPump
= None
77 self
._SynchronousMachine
= value
78 if self
._SynchronousMachine
is not None:
79 self
._SynchronousMachine
.HydroPump
= None
80 self
._SynchronousMachine
._HydroPump
= self
82 SynchronousMachine
= property(getSynchronousMachine
, setSynchronousMachine
)
84 def getHydroPumpOpSchedule(self
):
85 """The hydro pump has a pumping schedule over time, indicating when pumping is to occur.
87 return self
._HydroPumpOpSchedule
89 def setHydroPumpOpSchedule(self
, value
):
90 if self
._HydroPumpOpSchedule
is not None:
91 self
._HydroPumpOpSchedule
._HydroPump
= None
93 self
._HydroPumpOpSchedule
= value
94 if self
._HydroPumpOpSchedule
is not None:
95 self
._HydroPumpOpSchedule
.HydroPump
= None
96 self
._HydroPumpOpSchedule
._HydroPump
= self
98 HydroPumpOpSchedule
= property(getHydroPumpOpSchedule
, setHydroPumpOpSchedule
)
100 def getHydroPowerPlant(self
):
101 """The hydro pump may be a member of a pumped storage plant or a pump for distributing water
103 return self
._HydroPowerPlant
105 def setHydroPowerPlant(self
, value
):
106 if self
._HydroPowerPlant
is not None:
107 filtered
= [x
for x
in self
.HydroPowerPlant
.HydroPumps
if x
!= self
]
108 self
._HydroPowerPlant
._HydroPumps
= filtered
110 self
._HydroPowerPlant
= value
111 if self
._HydroPowerPlant
is not None:
112 if self
not in self
._HydroPowerPlant
._HydroPumps
:
113 self
._HydroPowerPlant
._HydroPumps
.append(self
)
115 HydroPowerPlant
= property(getHydroPowerPlant
, setHydroPowerPlant
)