Adding class meta-data attributes.
[PyCIM.git] / schemata / CIM14 / IEC61970 / Generation / Production / HydroPump.py
blobe28831fca4e5a687a05d464bb465b44901077001
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.PowerSystemResource import PowerSystemResource
19 class HydroPump(PowerSystemResource):
20 """A synchronous motor-driven pump, typically associated with a pumped storage plant
21 """
23 def __init__(self, pumpPowerAtMaxHead=0.0, pumpPowerAtMinHead=0.0, pumpDischAtMinHead=0.0, pumpDischAtMaxHead=0.0, SynchronousMachine=None, HydroPumpOpSchedule=None, HydroPowerPlant=None, *args, **kw_args):
24 """Initialises a new 'HydroPump' instance.
26 @param pumpPowerAtMaxHead: The pumping power under maximum head conditions, usually at full gate
27 @param pumpPowerAtMinHead: The pumping power under minimum head conditions, usually at full gate.
28 @param pumpDischAtMinHead: The pumping discharge (m3/sec) under minimum head conditions, usually at full gate
29 @param pumpDischAtMaxHead: The pumping discharge (m3/sec) under maximum head conditions, usually at full gate
30 @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.
31 @param HydroPumpOpSchedule: The hydro pump has a pumping schedule over time, indicating when pumping is to occur.
32 @param HydroPowerPlant: The hydro pump may be a member of a pumped storage plant or a pump for distributing water
33 """
34 #: The pumping power under maximum head conditions, usually at full gate
35 self.pumpPowerAtMaxHead = pumpPowerAtMaxHead
37 #: The pumping power under minimum head conditions, usually at full gate.
38 self.pumpPowerAtMinHead = pumpPowerAtMinHead
40 #: The pumping discharge (m3/sec) under minimum head conditions, usually at full gate
41 self.pumpDischAtMinHead = pumpDischAtMinHead
43 #: The pumping discharge (m3/sec) under maximum head conditions, usually at full gate
44 self.pumpDischAtMaxHead = pumpDischAtMaxHead
46 self._SynchronousMachine = None
47 self.SynchronousMachine = SynchronousMachine
49 self._HydroPumpOpSchedule = None
50 self.HydroPumpOpSchedule = HydroPumpOpSchedule
52 self._HydroPowerPlant = None
53 self.HydroPowerPlant = HydroPowerPlant
55 super(HydroPump, self).__init__(*args, **kw_args)
57 _attrs = ["pumpPowerAtMaxHead", "pumpPowerAtMinHead", "pumpDischAtMinHead", "pumpDischAtMaxHead"]
58 _attr_types = {"pumpPowerAtMaxHead": float, "pumpPowerAtMinHead": float, "pumpDischAtMinHead": float, "pumpDischAtMaxHead": float}
59 _defaults = {"pumpPowerAtMaxHead": 0.0, "pumpPowerAtMinHead": 0.0, "pumpDischAtMinHead": 0.0, "pumpDischAtMaxHead": 0.0}
60 _enums = {}
61 _refs = ["SynchronousMachine", "HydroPumpOpSchedule", "HydroPowerPlant"]
62 _many_refs = []
64 def getSynchronousMachine(self):
65 """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.
66 """
67 return self._SynchronousMachine
69 def setSynchronousMachine(self, value):
70 if self._SynchronousMachine is not None:
71 self._SynchronousMachine._HydroPump = None
73 self._SynchronousMachine = value
74 if self._SynchronousMachine is not None:
75 self._SynchronousMachine._HydroPump = self
77 SynchronousMachine = property(getSynchronousMachine, setSynchronousMachine)
79 def getHydroPumpOpSchedule(self):
80 """The hydro pump has a pumping schedule over time, indicating when pumping is to occur.
81 """
82 return self._HydroPumpOpSchedule
84 def setHydroPumpOpSchedule(self, value):
85 if self._HydroPumpOpSchedule is not None:
86 self._HydroPumpOpSchedule._HydroPump = None
88 self._HydroPumpOpSchedule = value
89 if self._HydroPumpOpSchedule is not None:
90 self._HydroPumpOpSchedule._HydroPump = self
92 HydroPumpOpSchedule = property(getHydroPumpOpSchedule, setHydroPumpOpSchedule)
94 def getHydroPowerPlant(self):
95 """The hydro pump may be a member of a pumped storage plant or a pump for distributing water
96 """
97 return self._HydroPowerPlant
99 def setHydroPowerPlant(self, value):
100 if self._HydroPowerPlant is not None:
101 filtered = [x for x in self.HydroPowerPlant.HydroPumps if x != self]
102 self._HydroPowerPlant._HydroPumps = filtered
104 self._HydroPowerPlant = value
105 if self._HydroPowerPlant is not None:
106 self._HydroPowerPlant._HydroPumps.append(self)
108 HydroPowerPlant = property(getHydroPowerPlant, setHydroPowerPlant)