Update README.rst
[PyCIM.git] / CIM14 / ENTSOE / Equipment / Wires / TapChanger.py
blob6b31c91658cd5fdc34bb8ee6913322a9d601c3d6
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
19 # IN THE SOFTWARE.
21 from CIM14.ENTSOE.Equipment.Core.PowerSystemResource import PowerSystemResource
23 class TapChanger(PowerSystemResource):
24 """Mechanism for changing transformer winding tap positions.
25 """
27 def __init__(self, stepVoltageIncrement=0.0, neutralStep=0, normalStep=0, ltcFlag=False, neutralU=0.0, lowStep=0, regulationStatus=False, highStep=0, RegulatingControl=None, *args, **kw_args):
28 """Initialises a new 'TapChanger' instance.
30 @param stepVoltageIncrement: Tap step increment, in per cent of nominal voltage, per step position. For a symmetrical PhaseTapChanger, the stepVoltageIncrement is used in the formula for calculation of the phase angle. For a symmetrical PhaseTapChanger, the voltage magnitude does not change with tap step.
31 @param neutralStep: The neutral tap step position for this winding.
32 @param normalStep: The tap step position used in 'normal' network operation for this winding. For a 'Fixed' tap changer indicates the current physical tap setting.
33 @param ltcFlag: Specifies whether or not a TapChanger has load tap changing capabilities.
34 @param neutralU: Voltage at which the winding operates at the neutral tap setting.
35 @param lowStep: Lowest possible tap step position, retard from neutral
36 @param regulationStatus: Specifies the default regulation status of the TapChanger. True is regulating. False is not regulating.
37 @param highStep: Highest possible tap step position, advance from neutral
38 @param RegulatingControl:
39 """
40 #: Tap step increment, in per cent of nominal voltage, per step position. For a symmetrical PhaseTapChanger, the stepVoltageIncrement is used in the formula for calculation of the phase angle. For a symmetrical PhaseTapChanger, the voltage magnitude does not change with tap step.
41 self.stepVoltageIncrement = stepVoltageIncrement
43 #: The neutral tap step position for this winding.
44 self.neutralStep = neutralStep
46 #: The tap step position used in 'normal' network operation for this winding. For a 'Fixed' tap changer indicates the current physical tap setting.
47 self.normalStep = normalStep
49 #: Specifies whether or not a TapChanger has load tap changing capabilities.
50 self.ltcFlag = ltcFlag
52 #: Voltage at which the winding operates at the neutral tap setting.
53 self.neutralU = neutralU
55 #: Lowest possible tap step position, retard from neutral
56 self.lowStep = lowStep
58 #: Specifies the default regulation status of the TapChanger. True is regulating. False is not regulating.
59 self.regulationStatus = regulationStatus
61 #: Highest possible tap step position, advance from neutral
62 self.highStep = highStep
64 self._RegulatingControl = None
65 self.RegulatingControl = RegulatingControl
67 super(TapChanger, self).__init__(*args, **kw_args)
69 _attrs = ["stepVoltageIncrement", "neutralStep", "normalStep", "ltcFlag", "neutralU", "lowStep", "regulationStatus", "highStep"]
70 _attr_types = {"stepVoltageIncrement": float, "neutralStep": int, "normalStep": int, "ltcFlag": bool, "neutralU": float, "lowStep": int, "regulationStatus": bool, "highStep": int}
71 _defaults = {"stepVoltageIncrement": 0.0, "neutralStep": 0, "normalStep": 0, "ltcFlag": False, "neutralU": 0.0, "lowStep": 0, "regulationStatus": False, "highStep": 0}
72 _enums = {}
73 _refs = ["RegulatingControl"]
74 _many_refs = []
76 def getRegulatingControl(self):
78 return self._RegulatingControl
80 def setRegulatingControl(self, value):
81 if self._RegulatingControl is not None:
82 filtered = [x for x in self.RegulatingControl.TapChanger if x != self]
83 self._RegulatingControl._TapChanger = filtered
85 self._RegulatingControl = value
86 if self._RegulatingControl is not None:
87 if self not in self._RegulatingControl._TapChanger:
88 self._RegulatingControl._TapChanger.append(self)
90 RegulatingControl = property(getRegulatingControl, setRegulatingControl)