Fixing website and API documentation links
[PyCIM.git] / CIM14 / CDPSM / Balanced / IEC61968 / AssetModels / OpenCircuitTest.py
blob2ebf5d5a16cab9684e1f4eea2eaad02bfe0c86ed
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.IEC61968.AssetModels.DistributionWindingTest import DistributionWindingTest
23 class OpenCircuitTest(DistributionWindingTest):
24 """Open-circuit test results may include no-load losses, exciting current, phase shifts, and induced voltage. For three-phase windings, the excitation can be positive sequence (the default) or zero sequence. For induced voltage and phase shifts, use the associated ToWindingSpec class.
25 """
27 def __init__(self, noLoadLossZero=0.0, noLoadLoss=0.0, excitingCurrent=0.0, excitingCurrentZero=0.0, MeasuredWindingSpecs=None, *args, **kw_args):
28 """Initialises a new 'OpenCircuitTest' instance.
30 @param noLoadLossZero: Losses measured from a zero-sequence open-circuit (excitation) test.
31 @param noLoadLoss: Losses measured from a positive-sequence or single-phase open-circuit (excitation) test.
32 @param excitingCurrent: Exciting current measured from a positive-sequence or single-phase open-circuit (excitation) test.
33 @param excitingCurrentZero: Exciting current measured from a zero-sequence open-circuit (excitation) test.
34 @param MeasuredWindingSpecs: All other windings measured during this test.
35 """
36 #: Losses measured from a zero-sequence open-circuit (excitation) test.
37 self.noLoadLossZero = noLoadLossZero
39 #: Losses measured from a positive-sequence or single-phase open-circuit (excitation) test.
40 self.noLoadLoss = noLoadLoss
42 #: Exciting current measured from a positive-sequence or single-phase open-circuit (excitation) test.
43 self.excitingCurrent = excitingCurrent
45 #: Exciting current measured from a zero-sequence open-circuit (excitation) test.
46 self.excitingCurrentZero = excitingCurrentZero
48 self._MeasuredWindingSpecs = []
49 self.MeasuredWindingSpecs = [] if MeasuredWindingSpecs is None else MeasuredWindingSpecs
51 super(OpenCircuitTest, self).__init__(*args, **kw_args)
53 _attrs = ["noLoadLossZero", "noLoadLoss", "excitingCurrent", "excitingCurrentZero"]
54 _attr_types = {"noLoadLossZero": float, "noLoadLoss": float, "excitingCurrent": float, "excitingCurrentZero": float}
55 _defaults = {"noLoadLossZero": 0.0, "noLoadLoss": 0.0, "excitingCurrent": 0.0, "excitingCurrentZero": 0.0}
56 _enums = {}
57 _refs = ["MeasuredWindingSpecs"]
58 _many_refs = ["MeasuredWindingSpecs"]
60 def getMeasuredWindingSpecs(self):
61 """All other windings measured during this test.
62 """
63 return self._MeasuredWindingSpecs
65 def setMeasuredWindingSpecs(self, value):
66 for p in self._MeasuredWindingSpecs:
67 filtered = [q for q in p.OpenCircuitTests if q != self]
68 self._MeasuredWindingSpecs._OpenCircuitTests = filtered
69 for r in value:
70 if self not in r._OpenCircuitTests:
71 r._OpenCircuitTests.append(self)
72 self._MeasuredWindingSpecs = value
74 MeasuredWindingSpecs = property(getMeasuredWindingSpecs, setMeasuredWindingSpecs)
76 def addMeasuredWindingSpecs(self, *MeasuredWindingSpecs):
77 for obj in MeasuredWindingSpecs:
78 if self not in obj._OpenCircuitTests:
79 obj._OpenCircuitTests.append(self)
80 self._MeasuredWindingSpecs.append(obj)
82 def removeMeasuredWindingSpecs(self, *MeasuredWindingSpecs):
83 for obj in MeasuredWindingSpecs:
84 if self in obj._OpenCircuitTests:
85 obj._OpenCircuitTests.remove(self)
86 self._MeasuredWindingSpecs.remove(obj)