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
.Wires
.TapChanger
import TapChanger
19 class RatioTapChanger(TapChanger
):
20 """A tap changer that changes the voltage ratio impacting the voltage magnitude but not direclty the phase angle across the transformer..
23 def __init__(self
, tculControlMode
="volt", Winding
=None, TransformerWinding
=None, RatioVariationCurve
=None, *args
, **kw_args
):
24 """Initialises a new 'RatioTapChanger' instance.
26 @param tculControlMode: Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Values are: "volt", "reactive"
27 @param Winding: Winding to which this ratio tap changer belongs.
28 @param TransformerWinding: The transformer winding to which the ratio tap changer belongs.
29 @param RatioVariationCurve: A RatioTapChanger can have an associated RatioVariationCurve to define tap ratio variations with tap step changes.
31 #: Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Values are: "volt", "reactive"
32 self
.tculControlMode
= tculControlMode
35 self
.Winding
= Winding
37 self
._TransformerWinding
= None
38 self
.TransformerWinding
= TransformerWinding
40 self
._RatioVariationCurve
= None
41 self
.RatioVariationCurve
= RatioVariationCurve
43 super(RatioTapChanger
, self
).__init
__(*args
, **kw_args
)
45 _attrs
= ["tculControlMode"]
46 _attr_types
= {"tculControlMode": str}
47 _defaults
= {"tculControlMode": "volt"}
48 _enums
= {"tculControlMode": "TransformerControlMode"}
49 _refs
= ["Winding", "TransformerWinding", "RatioVariationCurve"]
53 """Winding to which this ratio tap changer belongs.
57 def setWinding(self
, value
):
58 if self
._Winding
is not None:
59 self
._Winding
._RatioTapChanger
= None
62 if self
._Winding
is not None:
63 self
._Winding
._RatioTapChanger
= self
65 Winding
= property(getWinding
, setWinding
)
67 def getTransformerWinding(self
):
68 """The transformer winding to which the ratio tap changer belongs.
70 return self
._TransformerWinding
72 def setTransformerWinding(self
, value
):
73 if self
._TransformerWinding
is not None:
74 self
._TransformerWinding
._RatioTapChanger
= None
76 self
._TransformerWinding
= value
77 if self
._TransformerWinding
is not None:
78 self
._TransformerWinding
._RatioTapChanger
= self
80 TransformerWinding
= property(getTransformerWinding
, setTransformerWinding
)
82 def getRatioVariationCurve(self
):
83 """A RatioTapChanger can have an associated RatioVariationCurve to define tap ratio variations with tap step changes.
85 return self
._RatioVariationCurve
87 def setRatioVariationCurve(self
, value
):
88 if self
._RatioVariationCurve
is not None:
89 self
._RatioVariationCurve
._RatioTapChanger
= None
91 self
._RatioVariationCurve
= value
92 if self
._RatioVariationCurve
is not None:
93 self
._RatioVariationCurve
._RatioTapChanger
= self
95 RatioVariationCurve
= property(getRatioVariationCurve
, setRatioVariationCurve
)