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
.Balanced
.IEC61970
.Core
.IdentifiedObject
import IdentifiedObject
23 class ConductorInfo(IdentifiedObject
):
27 def __init__(self
, phaseCount
=0, insulationMaterial
="crosslinkedPolyethylene", insulationThickness
=0.0, insulated
=False, usage
="secondary", WireArrangements
=None, ConductorSegments
=None, *args
, **kw_args
):
28 """Initialises a new 'ConductorInfo' instance.
30 @param phaseCount: Number of phases (including neutral) to be retained. Any wires beyond this number should be reduced into the earth return.
31 @param insulationMaterial: (if insulated conductor) Material used for insulation. Values are: "crosslinkedPolyethylene", "butyl", "treeRetardantCrosslinkedPolyethylene", "asbestosAndVarnishedCambric", "highPressureFluidFilled", "ethylenePropyleneRubber", "ozoneResistantRubber", "oilPaper", "varnishedDacronGlass", "highMolecularWeightPolyethylene", "other", "varnishedCambricCloth", "treeResistantHighMolecularWeightPolyethylene", "unbeltedPilc", "beltedPilc", "rubber", "lowCapacitanceRubber", "siliconRubber"
32 @param insulationThickness: (if insulated conductor) Thickness of the insulation.
33 @param insulated: True if conductor is insulated.
34 @param usage: Usage of this conductor. Values are: "secondary", "other", "distribution", "transmission"
35 @param WireArrangements: All wire arrangements (single wires) that make this conductor.
36 @param ConductorSegments: All conductor segments described by this conductor data.
38 #: Number of phases (including neutral) to be retained. Any wires beyond this number should be reduced into the earth return.
39 self
.phaseCount
= phaseCount
41 #: (if insulated conductor) Material used for insulation. Values are: "crosslinkedPolyethylene", "butyl", "treeRetardantCrosslinkedPolyethylene", "asbestosAndVarnishedCambric", "highPressureFluidFilled", "ethylenePropyleneRubber", "ozoneResistantRubber", "oilPaper", "varnishedDacronGlass", "highMolecularWeightPolyethylene", "other", "varnishedCambricCloth", "treeResistantHighMolecularWeightPolyethylene", "unbeltedPilc", "beltedPilc", "rubber", "lowCapacitanceRubber", "siliconRubber"
42 self
.insulationMaterial
= insulationMaterial
44 #: (if insulated conductor) Thickness of the insulation.
45 self
.insulationThickness
= insulationThickness
47 #: True if conductor is insulated.
48 self
.insulated
= insulated
50 #: Usage of this conductor. Values are: "secondary", "other", "distribution", "transmission"
53 self
._WireArrangements
= []
54 self
.WireArrangements
= [] if WireArrangements
is None else WireArrangements
56 self
._ConductorSegments
= []
57 self
.ConductorSegments
= [] if ConductorSegments
is None else ConductorSegments
59 super(ConductorInfo
, self
).__init
__(*args
, **kw_args
)
61 _attrs
= ["phaseCount", "insulationMaterial", "insulationThickness", "insulated", "usage"]
62 _attr_types
= {"phaseCount": int, "insulationMaterial": str, "insulationThickness": float, "insulated": bool, "usage": str}
63 _defaults
= {"phaseCount": 0, "insulationMaterial": "crosslinkedPolyethylene", "insulationThickness": 0.0, "insulated": False, "usage": "secondary"}
64 _enums
= {"insulationMaterial": "ConductorInsulationKind", "usage": "ConductorUsageKind"}
65 _refs
= ["WireArrangements", "ConductorSegments"]
66 _many_refs
= ["WireArrangements", "ConductorSegments"]
68 def getWireArrangements(self
):
69 """All wire arrangements (single wires) that make this conductor.
71 return self
._WireArrangements
73 def setWireArrangements(self
, value
):
74 for x
in self
._WireArrangements
:
75 x
.ConductorInfo
= None
77 y
._ConductorInfo
= self
78 self
._WireArrangements
= value
80 WireArrangements
= property(getWireArrangements
, setWireArrangements
)
82 def addWireArrangements(self
, *WireArrangements
):
83 for obj
in WireArrangements
:
84 obj
.ConductorInfo
= self
86 def removeWireArrangements(self
, *WireArrangements
):
87 for obj
in WireArrangements
:
88 obj
.ConductorInfo
= None
90 def getConductorSegments(self
):
91 """All conductor segments described by this conductor data.
93 return self
._ConductorSegments
95 def setConductorSegments(self
, value
):
96 for x
in self
._ConductorSegments
:
97 x
.ConductorInfo
= None
99 y
._ConductorInfo
= self
100 self
._ConductorSegments
= value
102 ConductorSegments
= property(getConductorSegments
, setConductorSegments
)
104 def addConductorSegments(self
, *ConductorSegments
):
105 for obj
in ConductorSegments
:
106 obj
.ConductorInfo
= self
108 def removeConductorSegments(self
, *ConductorSegments
):
109 for obj
in ConductorSegments
:
110 obj
.ConductorInfo
= None