Removing package directories.
[PyCIM.git] / CIM14 / IEC61970 / OperationalLimits / BranchGroup.py
blob8426e99acdefed555e85d472f311518012b53ac9
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 BranchGroup(IdentifiedObject):
20 """A group of branch terminals whose directed flow summation is to be monitored. Abranch group need not form a cutset of the network.
21 """
23 def __init__(self, minimumReactivePower=0.0, monitorActivePower=False, minimumActivePower=0.0, maximumReactivePower=0.0, maximumActivePower=0.0, monitorReactivePower=False, BranchGroupTerminal=None, *args, **kw_args):
24 """Initialises a new 'BranchGroup' instance.
26 @param minimumReactivePower: The minimum reactive power flow.
27 @param monitorActivePower: Monitor the active power flow.
28 @param minimumActivePower: The minimum active power flow.
29 @param maximumReactivePower: The maximum reactive power flow.
30 @param maximumActivePower: The maximum active power flow.
31 @param monitorReactivePower: Monitor the reactive power flow.
32 @param BranchGroupTerminal: The directed branch group terminals to be summed.
33 """
34 #: The minimum reactive power flow.
35 self.minimumReactivePower = minimumReactivePower
37 #: Monitor the active power flow.
38 self.monitorActivePower = monitorActivePower
40 #: The minimum active power flow.
41 self.minimumActivePower = minimumActivePower
43 #: The maximum reactive power flow.
44 self.maximumReactivePower = maximumReactivePower
46 #: The maximum active power flow.
47 self.maximumActivePower = maximumActivePower
49 #: Monitor the reactive power flow.
50 self.monitorReactivePower = monitorReactivePower
52 self._BranchGroupTerminal = []
53 self.BranchGroupTerminal = [] if BranchGroupTerminal is None else BranchGroupTerminal
55 super(BranchGroup, self).__init__(*args, **kw_args)
57 _attrs = ["minimumReactivePower", "monitorActivePower", "minimumActivePower", "maximumReactivePower", "maximumActivePower", "monitorReactivePower"]
58 _attr_types = {"minimumReactivePower": float, "monitorActivePower": bool, "minimumActivePower": float, "maximumReactivePower": float, "maximumActivePower": float, "monitorReactivePower": bool}
59 _defaults = {"minimumReactivePower": 0.0, "monitorActivePower": False, "minimumActivePower": 0.0, "maximumReactivePower": 0.0, "maximumActivePower": 0.0, "monitorReactivePower": False}
60 _enums = {}
61 _refs = ["BranchGroupTerminal"]
62 _many_refs = ["BranchGroupTerminal"]
64 def getBranchGroupTerminal(self):
65 """The directed branch group terminals to be summed.
66 """
67 return self._BranchGroupTerminal
69 def setBranchGroupTerminal(self, value):
70 for x in self._BranchGroupTerminal:
71 x._BranchGroup = None
72 for y in value:
73 y._BranchGroup = self
74 self._BranchGroupTerminal = value
76 BranchGroupTerminal = property(getBranchGroupTerminal, setBranchGroupTerminal)
78 def addBranchGroupTerminal(self, *BranchGroupTerminal):
79 for obj in BranchGroupTerminal:
80 obj._BranchGroup = self
81 self._BranchGroupTerminal.append(obj)
83 def removeBranchGroupTerminal(self, *BranchGroupTerminal):
84 for obj in BranchGroupTerminal:
85 obj._BranchGroup = None
86 self._BranchGroupTerminal.remove(obj)