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
.CDPSM
.GIS_Connectivity
.IEC61970
.Core
.PowerSystemResource
import PowerSystemResource
23 class TapChanger(PowerSystemResource
):
24 """Mechanism for changing transformer winding tap positions.
27 def __init__(self
, stepVoltageIncrement
=0.0, subsequentDelay
=0.0, neutralStep
=0, normalStep
=0, ltcFlag
=False, neutralU
=0.0, lowStep
=0, initialDelay
=0.0, regulationStatus
=False, highStep
=0, SvTapStep
=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 subsequentDelay: For an LTC, the delay for subsequent tap changer operation (second and later step changes)
32 @param neutralStep: The neutral tap step position for this winding.
33 @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.
34 @param ltcFlag: Specifies whether or not a TapChanger has load tap changing capabilities.
35 @param neutralU: Voltage at which the winding operates at the neutral tap setting.
36 @param lowStep: Lowest possible tap step position, retard from neutral
37 @param initialDelay: For an LTC, the delay for initial tap changer operation (first step change)
38 @param regulationStatus: Specifies the default regulation status of the TapChanger. True is regulating. False is not regulating.
39 @param highStep: Highest possible tap step position, advance from neutral
40 @param SvTapStep: The tap step state associated with the tap changer.
42 #: 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.
43 self
.stepVoltageIncrement
= stepVoltageIncrement
45 #: For an LTC, the delay for subsequent tap changer operation (second and later step changes)
46 self
.subsequentDelay
= subsequentDelay
48 #: The neutral tap step position for this winding.
49 self
.neutralStep
= neutralStep
51 #: The tap step position used in 'normal' network operation for this winding. For a 'Fixed' tap changer indicates the current physical tap setting.
52 self
.normalStep
= normalStep
54 #: Specifies whether or not a TapChanger has load tap changing capabilities.
55 self
.ltcFlag
= ltcFlag
57 #: Voltage at which the winding operates at the neutral tap setting.
58 self
.neutralU
= neutralU
60 #: Lowest possible tap step position, retard from neutral
61 self
.lowStep
= lowStep
63 #: For an LTC, the delay for initial tap changer operation (first step change)
64 self
.initialDelay
= initialDelay
66 #: Specifies the default regulation status of the TapChanger. True is regulating. False is not regulating.
67 self
.regulationStatus
= regulationStatus
69 #: Highest possible tap step position, advance from neutral
70 self
.highStep
= highStep
72 self
._SvTapStep
= None
73 self
.SvTapStep
= SvTapStep
75 super(TapChanger
, self
).__init
__(*args
, **kw_args
)
77 _attrs
= ["stepVoltageIncrement", "subsequentDelay", "neutralStep", "normalStep", "ltcFlag", "neutralU", "lowStep", "initialDelay", "regulationStatus", "highStep"]
78 _attr_types
= {"stepVoltageIncrement": float, "subsequentDelay": float, "neutralStep": int, "normalStep": int, "ltcFlag": bool, "neutralU": float, "lowStep": int, "initialDelay": float, "regulationStatus": bool, "highStep": int}
79 _defaults
= {"stepVoltageIncrement": 0.0, "subsequentDelay": 0.0, "neutralStep": 0, "normalStep": 0, "ltcFlag": False, "neutralU": 0.0, "lowStep": 0, "initialDelay": 0.0, "regulationStatus": False, "highStep": 0}
84 def getSvTapStep(self
):
85 """The tap step state associated with the tap changer.
87 return self
._SvTapStep
89 def setSvTapStep(self
, value
):
90 if self
._SvTapStep
is not None:
91 self
._SvTapStep
._TapChanger
= None
93 self
._SvTapStep
= value
94 if self
._SvTapStep
is not None:
95 self
._SvTapStep
.TapChanger
= None
96 self
._SvTapStep
._TapChanger
= self
98 SvTapStep
= property(getSvTapStep
, setSvTapStep
)