Implementing RDF/XML serialisation using meta-data attributes.
[PyCIM.git] / schemata / CIM14 / IEC61968 / AssetModels / WireType.py
blobdbc5f1244e543cec23e8770db3c63b8f3ef97e82
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 WireType(IdentifiedObject):
20 """Wire conductor (per IEEE specs). A specific type of wire or combination of wires, not insulated from each other, suitable for carrying electrical current.
21 """
23 def __init__(self, material="acsr", rAC25=0.0, sizeDescription='', rAC75=0.0, radius=0.0, coreRadius=0.0, rAC50=0.0, gmr=0.0, rDC20=0.0, ratedCurrent=0.0, coreStrandCount=0, strandCount=0, WireArrangements=None, ConcentricNeutralCableInfos=None, *args, **kw_args):
24 """Initialises a new 'WireType' instance.
26 @param material: Wire material. Values are: "acsr", "steel", "aluminum", "copper", "other"
27 @param rAC25: AC resistance per unit length of the conductor at 25 degrees C.
28 @param sizeDescription: Describes the wire guage or cross section (e.g., 4/0, #2, 336.5).
29 @param rAC75: AC resistance per unit length of the conductor at 75 degrees C.
30 @param radius: Outside radius of the wire.
31 @param coreRadius: (if there is a different core material) Radius of the central core.
32 @param rAC50: AC resistance per unit length of the conductor at 50 degrees C.
33 @param gmr: Geometric Mean Radius. If we replace the conductor by a thin walled tube of radius GMR, then its reactance is identical to the reactance of the actual conductor.
34 @param rDC20: DC resistance per unit length of the conductor at 20 degrees C.
35 @param ratedCurrent: Current carrying capacity of the wire under stated thermal conditions.
36 @param coreStrandCount: (if used) Number of strands in the steel core.
37 @param strandCount: Number of strands in the wire.
38 @param WireArrangements: All wire arrangements using this wire type.
39 @param ConcentricNeutralCableInfos: All concentric neutral cables using this wire type.
40 """
41 #: Wire material. Values are: "acsr", "steel", "aluminum", "copper", "other"
42 self.material = material
44 #: AC resistance per unit length of the conductor at 25 degrees C.
45 self.rAC25 = rAC25
47 #: Describes the wire guage or cross section (e.g., 4/0, #2, 336.5).
48 self.sizeDescription = sizeDescription
50 #: AC resistance per unit length of the conductor at 75 degrees C.
51 self.rAC75 = rAC75
53 #: Outside radius of the wire.
54 self.radius = radius
56 #: (if there is a different core material) Radius of the central core.
57 self.coreRadius = coreRadius
59 #: AC resistance per unit length of the conductor at 50 degrees C.
60 self.rAC50 = rAC50
62 #: Geometric Mean Radius. If we replace the conductor by a thin walled tube of radius GMR, then its reactance is identical to the reactance of the actual conductor.
63 self.gmr = gmr
65 #: DC resistance per unit length of the conductor at 20 degrees C.
66 self.rDC20 = rDC20
68 #: Current carrying capacity of the wire under stated thermal conditions.
69 self.ratedCurrent = ratedCurrent
71 #: (if used) Number of strands in the steel core.
72 self.coreStrandCount = coreStrandCount
74 #: Number of strands in the wire.
75 self.strandCount = strandCount
77 self._WireArrangements = []
78 self.WireArrangements = [] if WireArrangements is None else WireArrangements
80 self._ConcentricNeutralCableInfos = []
81 self.ConcentricNeutralCableInfos = [] if ConcentricNeutralCableInfos is None else ConcentricNeutralCableInfos
83 super(WireType, self).__init__(*args, **kw_args)
85 _attrs = ["material", "rAC25", "sizeDescription", "rAC75", "radius", "coreRadius", "rAC50", "gmr", "rDC20", "ratedCurrent", "coreStrandCount", "strandCount"]
86 _attr_types = {"material": str, "rAC25": float, "sizeDescription": str, "rAC75": float, "radius": float, "coreRadius": float, "rAC50": float, "gmr": float, "rDC20": float, "ratedCurrent": float, "coreStrandCount": int, "strandCount": int}
87 _defaults = {"material": "acsr", "rAC25": 0.0, "sizeDescription": '', "rAC75": 0.0, "radius": 0.0, "coreRadius": 0.0, "rAC50": 0.0, "gmr": 0.0, "rDC20": 0.0, "ratedCurrent": 0.0, "coreStrandCount": 0, "strandCount": 0}
88 _enums = {"material": "ConductorMaterialKind"}
89 _refs = ["WireArrangements", "ConcentricNeutralCableInfos"]
90 _many_refs = ["WireArrangements", "ConcentricNeutralCableInfos"]
92 def getWireArrangements(self):
93 """All wire arrangements using this wire type.
94 """
95 return self._WireArrangements
97 def setWireArrangements(self, value):
98 for x in self._WireArrangements:
99 x._WireType = None
100 for y in value:
101 y._WireType = self
102 self._WireArrangements = value
104 WireArrangements = property(getWireArrangements, setWireArrangements)
106 def addWireArrangements(self, *WireArrangements):
107 for obj in WireArrangements:
108 obj._WireType = self
109 self._WireArrangements.append(obj)
111 def removeWireArrangements(self, *WireArrangements):
112 for obj in WireArrangements:
113 obj._WireType = None
114 self._WireArrangements.remove(obj)
116 def getConcentricNeutralCableInfos(self):
117 """All concentric neutral cables using this wire type.
119 return self._ConcentricNeutralCableInfos
121 def setConcentricNeutralCableInfos(self, value):
122 for x in self._ConcentricNeutralCableInfos:
123 x._WireType = None
124 for y in value:
125 y._WireType = self
126 self._ConcentricNeutralCableInfos = value
128 ConcentricNeutralCableInfos = property(getConcentricNeutralCableInfos, setConcentricNeutralCableInfos)
130 def addConcentricNeutralCableInfos(self, *ConcentricNeutralCableInfos):
131 for obj in ConcentricNeutralCableInfos:
132 obj._WireType = self
133 self._ConcentricNeutralCableInfos.append(obj)
135 def removeConcentricNeutralCableInfos(self, *ConcentricNeutralCableInfos):
136 for obj in ConcentricNeutralCableInfos:
137 obj._WireType = None
138 self._ConcentricNeutralCableInfos.remove(obj)