Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Wires / ReactiveCapabilityCurve.py
blob1e0c4dc6f5f7d31cf3587e78c8c997d89b7d22e0
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.IEC61970.Core.Curve import Curve
23 class ReactiveCapabilityCurve(Curve):
24 """Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum.
25 """
27 def __init__(self, coolantTemperature=0.0, hydrogenPressure=0.0, InitiallyUsedBySynchronousMachines=None, SynchronousMachines=None, *args, **kw_args):
28 """Initialises a new 'ReactiveCapabilityCurve' instance.
30 @param coolantTemperature: The machine's coolant temperature (e.g., ambient air or stator circulating water).
31 @param hydrogenPressure: The hydrogen coolant pressure
32 @param InitiallyUsedBySynchronousMachines: Synchronous machines using this curve as default.
33 @param SynchronousMachines: Synchronous machines using this curve.
34 """
35 #: The machine's coolant temperature (e.g., ambient air or stator circulating water).
36 self.coolantTemperature = coolantTemperature
38 #: The hydrogen coolant pressure
39 self.hydrogenPressure = hydrogenPressure
41 self._InitiallyUsedBySynchronousMachines = []
42 self.InitiallyUsedBySynchronousMachines = [] if InitiallyUsedBySynchronousMachines is None else InitiallyUsedBySynchronousMachines
44 self._SynchronousMachines = []
45 self.SynchronousMachines = [] if SynchronousMachines is None else SynchronousMachines
47 super(ReactiveCapabilityCurve, self).__init__(*args, **kw_args)
49 _attrs = ["coolantTemperature", "hydrogenPressure"]
50 _attr_types = {"coolantTemperature": float, "hydrogenPressure": float}
51 _defaults = {"coolantTemperature": 0.0, "hydrogenPressure": 0.0}
52 _enums = {}
53 _refs = ["InitiallyUsedBySynchronousMachines", "SynchronousMachines"]
54 _many_refs = ["InitiallyUsedBySynchronousMachines", "SynchronousMachines"]
56 def getInitiallyUsedBySynchronousMachines(self):
57 """Synchronous machines using this curve as default.
58 """
59 return self._InitiallyUsedBySynchronousMachines
61 def setInitiallyUsedBySynchronousMachines(self, value):
62 for x in self._InitiallyUsedBySynchronousMachines:
63 x.InitialReactiveCapabilityCurve = None
64 for y in value:
65 y._InitialReactiveCapabilityCurve = self
66 self._InitiallyUsedBySynchronousMachines = value
68 InitiallyUsedBySynchronousMachines = property(getInitiallyUsedBySynchronousMachines, setInitiallyUsedBySynchronousMachines)
70 def addInitiallyUsedBySynchronousMachines(self, *InitiallyUsedBySynchronousMachines):
71 for obj in InitiallyUsedBySynchronousMachines:
72 obj.InitialReactiveCapabilityCurve = self
74 def removeInitiallyUsedBySynchronousMachines(self, *InitiallyUsedBySynchronousMachines):
75 for obj in InitiallyUsedBySynchronousMachines:
76 obj.InitialReactiveCapabilityCurve = None
78 def getSynchronousMachines(self):
79 """Synchronous machines using this curve.
80 """
81 return self._SynchronousMachines
83 def setSynchronousMachines(self, value):
84 for p in self._SynchronousMachines:
85 filtered = [q for q in p.ReactiveCapabilityCurves if q != self]
86 self._SynchronousMachines._ReactiveCapabilityCurves = filtered
87 for r in value:
88 if self not in r._ReactiveCapabilityCurves:
89 r._ReactiveCapabilityCurves.append(self)
90 self._SynchronousMachines = value
92 SynchronousMachines = property(getSynchronousMachines, setSynchronousMachines)
94 def addSynchronousMachines(self, *SynchronousMachines):
95 for obj in SynchronousMachines:
96 if self not in obj._ReactiveCapabilityCurves:
97 obj._ReactiveCapabilityCurves.append(self)
98 self._SynchronousMachines.append(obj)
100 def removeSynchronousMachines(self, *SynchronousMachines):
101 for obj in SynchronousMachines:
102 if self in obj._ReactiveCapabilityCurves:
103 obj._ReactiveCapabilityCurves.remove(self)
104 self._SynchronousMachines.remove(obj)