Bumping version for release.
[PyCIM.git] / CIM14 / IEC61968 / WiresExt / PerLengthSequenceImpedance.py
blob0204d281dc625d140db4412ba63631a1109a1ee8
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.IdentifiedObject import IdentifiedObject
19 class PerLengthSequenceImpedance(IdentifiedObject):
20 """Sequence impedance and admittance parameters per unit length, for transposed lines of 1, 2, or 3 phases. For 1-phase lines, define x=x0=xself. For 2-phase lines, define x=xs-xm and x0=xs+xm.
21 """
23 def __init__(self, r0=0.0, r=0.0, b0ch=0.0, x0=0.0, gch=0.0, g0ch=0.0, bch=0.0, x=0.0, ConductorSegments=None, *args, **kw_args):
24 """Initialises a new 'PerLengthSequenceImpedance' instance.
26 @param r0: Zero sequence series resistance, per unit of length.
27 @param r: Positive sequence series resistance, per unit of length.
28 @param b0ch: Zero sequence shunt (charging) susceptance, per unit of length.
29 @param x0: Zero sequence series reactance, per unit of length.
30 @param gch: Positive sequence shunt (charging) conductance, per unit of length.
31 @param g0ch: Zero sequence shunt (charging) conductance, per unit of length.
32 @param bch: Positive sequence shunt (charging) susceptance, per unit of length.
33 @param x: Positive sequence series reactance, per unit of length.
34 @param ConductorSegments: All conductor segments described by this sequence impedance.
35 """
36 #: Zero sequence series resistance, per unit of length.
37 self.r0 = r0
39 #: Positive sequence series resistance, per unit of length.
40 self.r = r
42 #: Zero sequence shunt (charging) susceptance, per unit of length.
43 self.b0ch = b0ch
45 #: Zero sequence series reactance, per unit of length.
46 self.x0 = x0
48 #: Positive sequence shunt (charging) conductance, per unit of length.
49 self.gch = gch
51 #: Zero sequence shunt (charging) conductance, per unit of length.
52 self.g0ch = g0ch
54 #: Positive sequence shunt (charging) susceptance, per unit of length.
55 self.bch = bch
57 #: Positive sequence series reactance, per unit of length.
58 self.x = x
60 self._ConductorSegments = []
61 self.ConductorSegments = [] if ConductorSegments is None else ConductorSegments
63 super(PerLengthSequenceImpedance, self).__init__(*args, **kw_args)
65 _attrs = ["r0", "r", "b0ch", "x0", "gch", "g0ch", "bch", "x"]
66 _attr_types = {"r0": float, "r": float, "b0ch": float, "x0": float, "gch": float, "g0ch": float, "bch": float, "x": float}
67 _defaults = {"r0": 0.0, "r": 0.0, "b0ch": 0.0, "x0": 0.0, "gch": 0.0, "g0ch": 0.0, "bch": 0.0, "x": 0.0}
68 _enums = {}
69 _refs = ["ConductorSegments"]
70 _many_refs = ["ConductorSegments"]
72 def getConductorSegments(self):
73 """All conductor segments described by this sequence impedance.
74 """
75 return self._ConductorSegments
77 def setConductorSegments(self, value):
78 for x in self._ConductorSegments:
79 x.SequenceImpedance = None
80 for y in value:
81 y._SequenceImpedance = self
82 self._ConductorSegments = value
84 ConductorSegments = property(getConductorSegments, setConductorSegments)
86 def addConductorSegments(self, *ConductorSegments):
87 for obj in ConductorSegments:
88 obj.SequenceImpedance = self
90 def removeConductorSegments(self, *ConductorSegments):
91 for obj in ConductorSegments:
92 obj.SequenceImpedance = None