Adding CDPSM package.
[PyCIM.git] / CIM14 / IEC61968 / AssetModels / ConductorInfo.py
blob07bfc07222d3757edaefd4fe10f88f154d32a9e8
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 ConductorInfo(IdentifiedObject):
20 """Conductor data.
21 """
23 def __init__(self, usage="distribution", insulationMaterial="crosslinkedPolyethylene", insulated=False, insulationThickness=0.0, phaseCount=0, ConductorSegments=None, WireArrangements=None, *args, **kw_args):
24 """Initialises a new 'ConductorInfo' instance.
26 @param usage: Usage of this conductor. Values are: "distribution", "secondary", "transmission", "other"
27 @param insulationMaterial: (if insulated conductor) Material used for insulation. Values are: "crosslinkedPolyethylene", "ozoneResistantRubber", "highMolecularWeightPolyethylene", "unbeltedPilc", "treeRetardantCrosslinkedPolyethylene", "butyl", "rubber", "asbestosAndVarnishedCambric", "beltedPilc", "varnishedDacronGlass", "other", "treeResistantHighMolecularWeightPolyethylene", "lowCapacitanceRubber", "varnishedCambricCloth", "highPressureFluidFilled", "ethylenePropyleneRubber", "siliconRubber", "oilPaper"
28 @param insulated: True if conductor is insulated.
29 @param insulationThickness: (if insulated conductor) Thickness of the insulation.
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 ConductorSegments: All conductor segments described by this conductor data.
32 @param WireArrangements: All wire arrangements (single wires) that make this conductor.
33 """
34 #: Usage of this conductor. Values are: "distribution", "secondary", "transmission", "other"
35 self.usage = usage
37 #: (if insulated conductor) Material used for insulation. Values are: "crosslinkedPolyethylene", "ozoneResistantRubber", "highMolecularWeightPolyethylene", "unbeltedPilc", "treeRetardantCrosslinkedPolyethylene", "butyl", "rubber", "asbestosAndVarnishedCambric", "beltedPilc", "varnishedDacronGlass", "other", "treeResistantHighMolecularWeightPolyethylene", "lowCapacitanceRubber", "varnishedCambricCloth", "highPressureFluidFilled", "ethylenePropyleneRubber", "siliconRubber", "oilPaper"
38 self.insulationMaterial = insulationMaterial
40 #: True if conductor is insulated.
41 self.insulated = insulated
43 #: (if insulated conductor) Thickness of the insulation.
44 self.insulationThickness = insulationThickness
46 #: Number of phases (including neutral) to be retained. Any wires beyond this number should be reduced into the earth return.
47 self.phaseCount = phaseCount
49 self._ConductorSegments = []
50 self.ConductorSegments = [] if ConductorSegments is None else ConductorSegments
52 self._WireArrangements = []
53 self.WireArrangements = [] if WireArrangements is None else WireArrangements
55 super(ConductorInfo, self).__init__(*args, **kw_args)
57 _attrs = ["usage", "insulationMaterial", "insulated", "insulationThickness", "phaseCount"]
58 _attr_types = {"usage": str, "insulationMaterial": str, "insulated": bool, "insulationThickness": float, "phaseCount": int}
59 _defaults = {"usage": "distribution", "insulationMaterial": "crosslinkedPolyethylene", "insulated": False, "insulationThickness": 0.0, "phaseCount": 0}
60 _enums = {"usage": "ConductorUsageKind", "insulationMaterial": "ConductorInsulationKind"}
61 _refs = ["ConductorSegments", "WireArrangements"]
62 _many_refs = ["ConductorSegments", "WireArrangements"]
64 def getConductorSegments(self):
65 """All conductor segments described by this conductor data.
66 """
67 return self._ConductorSegments
69 def setConductorSegments(self, value):
70 for x in self._ConductorSegments:
71 x.ConductorInfo = None
72 for y in value:
73 y._ConductorInfo = self
74 self._ConductorSegments = value
76 ConductorSegments = property(getConductorSegments, setConductorSegments)
78 def addConductorSegments(self, *ConductorSegments):
79 for obj in ConductorSegments:
80 obj.ConductorInfo = self
82 def removeConductorSegments(self, *ConductorSegments):
83 for obj in ConductorSegments:
84 obj.ConductorInfo = None
86 def getWireArrangements(self):
87 """All wire arrangements (single wires) that make this conductor.
88 """
89 return self._WireArrangements
91 def setWireArrangements(self, value):
92 for x in self._WireArrangements:
93 x.ConductorInfo = None
94 for y in value:
95 y._ConductorInfo = self
96 self._WireArrangements = value
98 WireArrangements = property(getWireArrangements, setWireArrangements)
100 def addWireArrangements(self, *WireArrangements):
101 for obj in WireArrangements:
102 obj.ConductorInfo = self
104 def removeWireArrangements(self, *WireArrangements):
105 for obj in WireArrangements:
106 obj.ConductorInfo = None