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 CIM15
.IEC61970
.Core
.PowerSystemResource
import PowerSystemResource
23 class HydroPump(PowerSystemResource
):
24 """A synchronous motor-driven pump, typically associated with a pumped storage plantA synchronous motor-driven pump, typically associated with a pumped storage plant
27 def __init__(self
, pumpDischAtMaxHead
=0.0, pumpDischAtMinHead
=0.0, pumpPowerAtMinHead
=0.0, pumpPowerAtMaxHead
=0.0, HydroPowerPlant
=None, HydroPumpOpSchedule
=None, SynchronousMachine
=None, *args
, **kw_args
):
28 """Initialises a new 'HydroPump' instance.
30 @param pumpDischAtMaxHead: The pumping discharge under maximum head conditions, usually at full gate
31 @param pumpDischAtMinHead: The pumping discharge under minimum head conditions, usually at full gate
32 @param pumpPowerAtMinHead: The pumping power under minimum head conditions, usually at full gate.
33 @param pumpPowerAtMaxHead: The pumping power under maximum head conditions, usually at full gate
34 @param HydroPowerPlant: The hydro pump may be a member of a pumped storage plant or a pump for distributing water
35 @param HydroPumpOpSchedule: The hydro pump has a pumping schedule over time, indicating when pumping is to occur.
36 @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.
38 #: The pumping discharge under maximum head conditions, usually at full gate
39 self
.pumpDischAtMaxHead
= pumpDischAtMaxHead
41 #: The pumping discharge under minimum head conditions, usually at full gate
42 self
.pumpDischAtMinHead
= pumpDischAtMinHead
44 #: The pumping power under minimum head conditions, usually at full gate.
45 self
.pumpPowerAtMinHead
= pumpPowerAtMinHead
47 #: The pumping power under maximum head conditions, usually at full gate
48 self
.pumpPowerAtMaxHead
= pumpPowerAtMaxHead
50 self
._HydroPowerPlant
= None
51 self
.HydroPowerPlant
= HydroPowerPlant
53 self
._HydroPumpOpSchedule
= None
54 self
.HydroPumpOpSchedule
= HydroPumpOpSchedule
56 self
._SynchronousMachine
= None
57 self
.SynchronousMachine
= SynchronousMachine
59 super(HydroPump
, self
).__init
__(*args
, **kw_args
)
61 _attrs
= ["pumpDischAtMaxHead", "pumpDischAtMinHead", "pumpPowerAtMinHead", "pumpPowerAtMaxHead"]
62 _attr_types
= {"pumpDischAtMaxHead": float, "pumpDischAtMinHead": float, "pumpPowerAtMinHead": float, "pumpPowerAtMaxHead": float}
63 _defaults
= {"pumpDischAtMaxHead": 0.0, "pumpDischAtMinHead": 0.0, "pumpPowerAtMinHead": 0.0, "pumpPowerAtMaxHead": 0.0}
65 _refs
= ["HydroPowerPlant", "HydroPumpOpSchedule", "SynchronousMachine"]
68 def getHydroPowerPlant(self
):
69 """The hydro pump may be a member of a pumped storage plant or a pump for distributing water
71 return self
._HydroPowerPlant
73 def setHydroPowerPlant(self
, value
):
74 if self
._HydroPowerPlant
is not None:
75 filtered
= [x
for x
in self
.HydroPowerPlant
.HydroPumps
if x
!= self
]
76 self
._HydroPowerPlant
._HydroPumps
= filtered
78 self
._HydroPowerPlant
= value
79 if self
._HydroPowerPlant
is not None:
80 if self
not in self
._HydroPowerPlant
._HydroPumps
:
81 self
._HydroPowerPlant
._HydroPumps
.append(self
)
83 HydroPowerPlant
= property(getHydroPowerPlant
, setHydroPowerPlant
)
85 def getHydroPumpOpSchedule(self
):
86 """The hydro pump has a pumping schedule over time, indicating when pumping is to occur.
88 return self
._HydroPumpOpSchedule
90 def setHydroPumpOpSchedule(self
, value
):
91 if self
._HydroPumpOpSchedule
is not None:
92 self
._HydroPumpOpSchedule
._HydroPump
= None
94 self
._HydroPumpOpSchedule
= value
95 if self
._HydroPumpOpSchedule
is not None:
96 self
._HydroPumpOpSchedule
.HydroPump
= None
97 self
._HydroPumpOpSchedule
._HydroPump
= self
99 HydroPumpOpSchedule
= property(getHydroPumpOpSchedule
, setHydroPumpOpSchedule
)
101 def getSynchronousMachine(self
):
102 """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.
104 return self
._SynchronousMachine
106 def setSynchronousMachine(self
, value
):
107 if self
._SynchronousMachine
is not None:
108 self
._SynchronousMachine
._HydroPump
= None
110 self
._SynchronousMachine
= value
111 if self
._SynchronousMachine
is not None:
112 self
._SynchronousMachine
.HydroPump
= None
113 self
._SynchronousMachine
._HydroPump
= self
115 SynchronousMachine
= property(getSynchronousMachine
, setSynchronousMachine
)