Fixing website and API documentation links
[PyCIM.git] / CIM14 / CDPSM / Balanced / IEC61968 / WiresExt / PerLengthSequenceImpedance.py
blob6b411f78017171ae98bd5bdc77d2783a1db01a57
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.CDPSM.Balanced.IEC61970.Core.IdentifiedObject import IdentifiedObject
23 class PerLengthSequenceImpedance(IdentifiedObject):
24 """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.
25 """
27 def __init__(self, x=0.0, gch=0.0, r0=0.0, x0=0.0, g0ch=0.0, b0ch=0.0, r=0.0, bch=0.0, ConductorSegments=None, *args, **kw_args):
28 """Initialises a new 'PerLengthSequenceImpedance' instance.
30 @param x: Positive sequence series reactance, per unit of length.
31 @param gch: Positive sequence shunt (charging) conductance, per unit of length.
32 @param r0: Zero sequence series resistance, per unit of length.
33 @param x0: Zero sequence series reactance, per unit of length.
34 @param g0ch: Zero sequence shunt (charging) conductance, per unit of length.
35 @param b0ch: Zero sequence shunt (charging) susceptance, per unit of length.
36 @param r: Positive sequence series resistance, per unit of length.
37 @param bch: Positive sequence shunt (charging) susceptance, per unit of length.
38 @param ConductorSegments: All conductor segments described by this sequence impedance.
39 """
40 #: Positive sequence series reactance, per unit of length.
41 self.x = x
43 #: Positive sequence shunt (charging) conductance, per unit of length.
44 self.gch = gch
46 #: Zero sequence series resistance, per unit of length.
47 self.r0 = r0
49 #: Zero sequence series reactance, per unit of length.
50 self.x0 = x0
52 #: Zero sequence shunt (charging) conductance, per unit of length.
53 self.g0ch = g0ch
55 #: Zero sequence shunt (charging) susceptance, per unit of length.
56 self.b0ch = b0ch
58 #: Positive sequence series resistance, per unit of length.
59 self.r = r
61 #: Positive sequence shunt (charging) susceptance, per unit of length.
62 self.bch = bch
64 self._ConductorSegments = []
65 self.ConductorSegments = [] if ConductorSegments is None else ConductorSegments
67 super(PerLengthSequenceImpedance, self).__init__(*args, **kw_args)
69 _attrs = ["x", "gch", "r0", "x0", "g0ch", "b0ch", "r", "bch"]
70 _attr_types = {"x": float, "gch": float, "r0": float, "x0": float, "g0ch": float, "b0ch": float, "r": float, "bch": float}
71 _defaults = {"x": 0.0, "gch": 0.0, "r0": 0.0, "x0": 0.0, "g0ch": 0.0, "b0ch": 0.0, "r": 0.0, "bch": 0.0}
72 _enums = {}
73 _refs = ["ConductorSegments"]
74 _many_refs = ["ConductorSegments"]
76 def getConductorSegments(self):
77 """All conductor segments described by this sequence impedance.
78 """
79 return self._ConductorSegments
81 def setConductorSegments(self, value):
82 for x in self._ConductorSegments:
83 x.SequenceImpedance = None
84 for y in value:
85 y._SequenceImpedance = self
86 self._ConductorSegments = value
88 ConductorSegments = property(getConductorSegments, setConductorSegments)
90 def addConductorSegments(self, *ConductorSegments):
91 for obj in ConductorSegments:
92 obj.SequenceImpedance = self
94 def removeConductorSegments(self, *ConductorSegments):
95 for obj in ConductorSegments:
96 obj.SequenceImpedance = None