Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ PyCIM.egg-info/
doc/api/
doc/_build/*
PyCIM/Test/Data/Confidential/

\.idea/
39 changes: 39 additions & 0 deletions CIM14/CDPSM/Asset/Element.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.


class Element(object):

def __init__(self, UUID=''):
"""Initialises a new 'Element' instance.

@param UUID:
"""

self.UUID = UUID


_attrs = ["UUID"]
_attr_types = {"UUID": str}
_defaults = {"UUID": ''}
_enums = {}
_refs = []
_many_refs = []

79 changes: 79 additions & 0 deletions CIM14/CDPSM/Asset/IEC61968/AssetModels/CableInfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

from CIM15.CDPSM.Asset.IEC61968.AssetModels.ConductorInfo import ConductorInfo

class CableInfo(ConductorInfo):
"""Cable data.
"""

def __init__(self, diameterOverJacket=0.0, constructionKind="sector", shieldMaterial="lead", outerJacketKind="pvc", isStrandFill=False, diameterOverInsulation=0.0, diameterOverScreen=0.0, sheathAsNeutral=False, nominalTemperature=0.0, diameterOverCore=0.0, *args, **kw_args):
"""Initialises a new 'CableInfo' instance.

@param diameterOverJacket: Diameter over the outermost jacketing layer.
@param constructionKind: Kind of construction of this cable. Values are: "sector", "other", "solid", "compacted", "stranded", "segmental", "compressed"
@param shieldMaterial: Material of the shield. Values are: "lead", "aluminum", "other", "copper", "steel"
@param outerJacketKind: Kind of outer jacket of this cable. Values are: "pvc", "linearLowDensityPolyethylene", "none", "insulating", "other", "polyethylene", "semiconducting"
@param isStrandFill: True if wire strands are extruded in a way to fill the voids in the cable.
@param diameterOverInsulation: Diameter over the insulating layer, excluding outer screen.
@param diameterOverScreen: Diameter over the outer screen; should be the shield's inside diameter..
@param sheathAsNeutral: True if sheath / shield is used as a neutral (i.e., bonded).
@param nominalTemperature: Maximum nominal design operating temperature.
@param diameterOverCore: Diameter over the core, including any semi-con screen; should be the insulating layer's inside diameter.
"""
#: Diameter over the outermost jacketing layer.
self.diameterOverJacket = diameterOverJacket

#: Kind of construction of this cable. Values are: "sector", "other", "solid", "compacted", "stranded", "segmental", "compressed"
self.constructionKind = constructionKind

#: Material of the shield. Values are: "lead", "aluminum", "other", "copper", "steel"
self.shieldMaterial = shieldMaterial

#: Kind of outer jacket of this cable. Values are: "pvc", "linearLowDensityPolyethylene", "none", "insulating", "other", "polyethylene", "semiconducting"
self.outerJacketKind = outerJacketKind

#: True if wire strands are extruded in a way to fill the voids in the cable.
self.isStrandFill = isStrandFill

#: Diameter over the insulating layer, excluding outer screen.
self.diameterOverInsulation = diameterOverInsulation

#: Diameter over the outer screen; should be the shield's inside diameter..
self.diameterOverScreen = diameterOverScreen

#: True if sheath / shield is used as a neutral (i.e., bonded).
self.sheathAsNeutral = sheathAsNeutral

#: Maximum nominal design operating temperature.
self.nominalTemperature = nominalTemperature

#: Diameter over the core, including any semi-con screen; should be the insulating layer's inside diameter.
self.diameterOverCore = diameterOverCore

super(CableInfo, self).__init__(*args, **kw_args)

_attrs = ["diameterOverJacket", "constructionKind", "shieldMaterial", "outerJacketKind", "isStrandFill", "diameterOverInsulation", "diameterOverScreen", "sheathAsNeutral", "nominalTemperature", "diameterOverCore"]
_attr_types = {"diameterOverJacket": float, "constructionKind": str, "shieldMaterial": str, "outerJacketKind": str, "isStrandFill": bool, "diameterOverInsulation": float, "diameterOverScreen": float, "sheathAsNeutral": bool, "nominalTemperature": float, "diameterOverCore": float}
_defaults = {"diameterOverJacket": 0.0, "constructionKind": "sector", "shieldMaterial": "lead", "outerJacketKind": "pvc", "isStrandFill": False, "diameterOverInsulation": 0.0, "diameterOverScreen": 0.0, "sheathAsNeutral": False, "nominalTemperature": 0.0, "diameterOverCore": 0.0}
_enums = {"constructionKind": "CableConstructionKind", "shieldMaterial": "CableShieldMaterialKind", "outerJacketKind": "CableOuterJacketKind"}
_refs = []
_many_refs = []

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

from CIM15.CDPSM.Asset.IEC61968.AssetModels.CableInfo import CableInfo

class ConcentricNeutralCableInfo(CableInfo):
"""Concentric neutral cable data.
"""

def __init__(self, diameterOverNeutral=0.0, neutralStrandCount=0, *args, **kw_args):
"""Initialises a new 'ConcentricNeutralCableInfo' instance.

@param diameterOverNeutral: Diameter over the concentric neutral strands.
@param neutralStrandCount: Number of concentric neutral strands.
"""
#: Diameter over the concentric neutral strands.
self.diameterOverNeutral = diameterOverNeutral

#: Number of concentric neutral strands.
self.neutralStrandCount = neutralStrandCount

super(ConcentricNeutralCableInfo, self).__init__(*args, **kw_args)

_attrs = ["diameterOverNeutral", "neutralStrandCount"]
_attr_types = {"diameterOverNeutral": float, "neutralStrandCount": int}
_defaults = {"diameterOverNeutral": 0.0, "neutralStrandCount": 0}
_enums = {}
_refs = []
_many_refs = []

111 changes: 111 additions & 0 deletions CIM14/CDPSM/Asset/IEC61968/AssetModels/ConductorInfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

from CIM15.CDPSM.Asset.IEC61968.Assets.AssetInfo import AssetInfo

class ConductorInfo(AssetInfo):
"""Conductor data.
"""

def __init__(self, usage="secondary", insulationThickness=0.0, insulated=False, insulationMaterial="treeRetardantCrosslinkedPolyethylene", phaseCount=0, WireArrangements=None, LineSegments=None, *args, **kw_args):
"""Initialises a new 'ConductorInfo' instance.

@param usage: Usage of this conductor. Values are: "secondary", "other", "distribution", "transmission"
@param insulationThickness: (if insulated conductor) Thickness of the insulation.
@param insulated: True if conductor is insulated.
@param insulationMaterial: (if insulated conductor) Material used for insulation. Values are: "treeRetardantCrosslinkedPolyethylene", "butyl", "highPressureFluidFilled", "other", "varnishedCambricCloth", "siliconRubber", "beltedPilc", "crosslinkedPolyethylene", "oilPaper", "lowCapacitanceRubber", "asbestosAndVarnishedCambric", "treeResistantHighMolecularWeightPolyethylene", "unbeltedPilc", "ozoneResistantRubber", "ethylenePropyleneRubber", "highMolecularWeightPolyethylene", "varnishedDacronGlass", "rubber"
@param phaseCount: Number of phases (including neutral) to be retained. Any wires beyond this number should be reduced into the earth return.
@param WireArrangements: All wire arrangements (single wires) that make this conductor.
@param LineSegments: All line segments described by this conductor data.
"""
#: Usage of this conductor. Values are: "secondary", "other", "distribution", "transmission"
self.usage = usage

#: (if insulated conductor) Thickness of the insulation.
self.insulationThickness = insulationThickness

#: True if conductor is insulated.
self.insulated = insulated

#: (if insulated conductor) Material used for insulation. Values are: "treeRetardantCrosslinkedPolyethylene", "butyl", "highPressureFluidFilled", "other", "varnishedCambricCloth", "siliconRubber", "beltedPilc", "crosslinkedPolyethylene", "oilPaper", "lowCapacitanceRubber", "asbestosAndVarnishedCambric", "treeResistantHighMolecularWeightPolyethylene", "unbeltedPilc", "ozoneResistantRubber", "ethylenePropyleneRubber", "highMolecularWeightPolyethylene", "varnishedDacronGlass", "rubber"
self.insulationMaterial = insulationMaterial

#: Number of phases (including neutral) to be retained. Any wires beyond this number should be reduced into the earth return.
self.phaseCount = phaseCount

self._WireArrangements = []
self.WireArrangements = [] if WireArrangements is None else WireArrangements

self._LineSegments = []
self.LineSegments = [] if LineSegments is None else LineSegments

super(ConductorInfo, self).__init__(*args, **kw_args)

_attrs = ["usage", "insulationThickness", "insulated", "insulationMaterial", "phaseCount"]
_attr_types = {"usage": str, "insulationThickness": float, "insulated": bool, "insulationMaterial": str, "phaseCount": int}
_defaults = {"usage": "secondary", "insulationThickness": 0.0, "insulated": False, "insulationMaterial": "treeRetardantCrosslinkedPolyethylene", "phaseCount": 0}
_enums = {"usage": "ConductorUsageKind", "insulationMaterial": "ConductorInsulationKind"}
_refs = ["WireArrangements", "LineSegments"]
_many_refs = ["WireArrangements", "LineSegments"]

def getWireArrangements(self):
"""All wire arrangements (single wires) that make this conductor.
"""
return self._WireArrangements

def setWireArrangements(self, value):
for x in self._WireArrangements:
x.ConductorInfo = None
for y in value:
y._ConductorInfo = self
self._WireArrangements = value

WireArrangements = property(getWireArrangements, setWireArrangements)

def addWireArrangements(self, *WireArrangements):
for obj in WireArrangements:
obj.ConductorInfo = self

def removeWireArrangements(self, *WireArrangements):
for obj in WireArrangements:
obj.ConductorInfo = None

def getLineSegments(self):
"""All line segments described by this conductor data.
"""
return self._LineSegments

def setLineSegments(self, value):
for x in self._LineSegments:
x.ConductorInfo = None
for y in value:
y._ConductorInfo = self
self._LineSegments = value

LineSegments = property(getLineSegments, setLineSegments)

def addLineSegments(self, *LineSegments):
for obj in LineSegments:
obj.ConductorInfo = self

def removeLineSegments(self, *LineSegments):
for obj in LineSegments:
obj.ConductorInfo = None

51 changes: 51 additions & 0 deletions CIM14/CDPSM/Asset/IEC61968/AssetModels/EndDeviceInfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

from CIM15.CDPSM.Asset.IEC61968.Assets.AssetInfo import AssetInfo

class EndDeviceInfo(AssetInfo):
"""End device data.
"""

def __init__(self, ratedCurrent=0.0, ratedVoltage=0.0, phaseCount=0, *args, **kw_args):
"""Initialises a new 'EndDeviceInfo' instance.

@param ratedCurrent: Rated current.
@param ratedVoltage: Rated voltage.
@param phaseCount: Number of potential phases the end device supports, typically 0, 1 or 3.
"""
#: Rated current.
self.ratedCurrent = ratedCurrent

#: Rated voltage.
self.ratedVoltage = ratedVoltage

#: Number of potential phases the end device supports, typically 0, 1 or 3.
self.phaseCount = phaseCount

super(EndDeviceInfo, self).__init__(*args, **kw_args)

_attrs = ["ratedCurrent", "ratedVoltage", "phaseCount"]
_attr_types = {"ratedCurrent": float, "ratedVoltage": float, "phaseCount": int}
_defaults = {"ratedCurrent": 0.0, "ratedVoltage": 0.0, "phaseCount": 0}
_enums = {}
_refs = []
_many_refs = []

51 changes: 51 additions & 0 deletions CIM14/CDPSM/Asset/IEC61968/AssetModels/OverheadConductorInfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

from CIM15.CDPSM.Asset.IEC61968.AssetModels.ConductorInfo import ConductorInfo

class OverheadConductorInfo(ConductorInfo):
"""Overhead conductor data.
"""

def __init__(self, neutralInsulationThickness=0.0, phaseConductorSpacing=0.0, phaseConductorCount=0, *args, **kw_args):
"""Initialises a new 'OverheadConductorInfo' instance.

@param neutralInsulationThickness: (if applicable) Insulation thickness of the neutral conductor.
@param phaseConductorSpacing: Distance between conductor strands in a symmetrical bundle.
@param phaseConductorCount: Number of conductor strands in the symmetrical bundle (1-12).
"""
#: (if applicable) Insulation thickness of the neutral conductor.
self.neutralInsulationThickness = neutralInsulationThickness

#: Distance between conductor strands in a symmetrical bundle.
self.phaseConductorSpacing = phaseConductorSpacing

#: Number of conductor strands in the symmetrical bundle (1-12).
self.phaseConductorCount = phaseConductorCount

super(OverheadConductorInfo, self).__init__(*args, **kw_args)

_attrs = ["neutralInsulationThickness", "phaseConductorSpacing", "phaseConductorCount"]
_attr_types = {"neutralInsulationThickness": float, "phaseConductorSpacing": float, "phaseConductorCount": int}
_defaults = {"neutralInsulationThickness": 0.0, "phaseConductorSpacing": 0.0, "phaseConductorCount": 0}
_enums = {}
_refs = []
_many_refs = []

Loading