Fixing website and API documentation links
[PyCIM.git] / CIM14 / ENTSOE / Equipment / ControlArea / ControlArea.py
blobe737b7c1df6bcefca243894ee4c865f913556c94
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.ENTSOE.Equipment.Core.PowerSystemResource import PowerSystemResource
23 class ControlArea(PowerSystemResource):
24 """A <b>control area </b>is a grouping of <b>generating units</b> and/or loads and a cutset of tie lines (as <b>terminals</b>) which may be used for a variety of purposes including automatic generation control, powerflow solution area interchange control specification, and input to load forecasting. Note that any number of overlapping control area specifications can be superimposed on the physical model.
25 """
27 def __init__(self, netInterchange=0.0, type="Interchange", pTolerance=0.0, EnergyArea=None, ControlAreaGeneratingUnit=None, TieFlow=None, *args, **kw_args):
28 """Initialises a new 'ControlArea' instance.
30 @param netInterchange: The specified positive net interchange into the control area.
31 @param type: The type of control area defintion used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. Values are: "Interchange", "Forecast", "AGC"
32 @param pTolerance: Active power net interchange tolerance
33 @param EnergyArea: The energy area that is forecast from this control area specification.
34 @param ControlAreaGeneratingUnit: The generating unit specificaitons for the control area.
35 @param TieFlow: The tie flows associated with the control area.
36 """
37 #: The specified positive net interchange into the control area.
38 self.netInterchange = netInterchange
40 #: The type of control area defintion used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. Values are: "Interchange", "Forecast", "AGC"
41 self.type = type
43 #: Active power net interchange tolerance
44 self.pTolerance = pTolerance
46 self._EnergyArea = None
47 self.EnergyArea = EnergyArea
49 self._ControlAreaGeneratingUnit = []
50 self.ControlAreaGeneratingUnit = [] if ControlAreaGeneratingUnit is None else ControlAreaGeneratingUnit
52 self._TieFlow = []
53 self.TieFlow = [] if TieFlow is None else TieFlow
55 super(ControlArea, self).__init__(*args, **kw_args)
57 _attrs = ["netInterchange", "type", "pTolerance"]
58 _attr_types = {"netInterchange": float, "type": str, "pTolerance": float}
59 _defaults = {"netInterchange": 0.0, "type": "Interchange", "pTolerance": 0.0}
60 _enums = {"type": "ControlAreaTypeKind"}
61 _refs = ["EnergyArea", "ControlAreaGeneratingUnit", "TieFlow"]
62 _many_refs = ["ControlAreaGeneratingUnit", "TieFlow"]
64 def getEnergyArea(self):
65 """The energy area that is forecast from this control area specification.
66 """
67 return self._EnergyArea
69 def setEnergyArea(self, value):
70 if self._EnergyArea is not None:
71 self._EnergyArea._ControlArea = None
73 self._EnergyArea = value
74 if self._EnergyArea is not None:
75 self._EnergyArea.ControlArea = None
76 self._EnergyArea._ControlArea = self
78 EnergyArea = property(getEnergyArea, setEnergyArea)
80 def getControlAreaGeneratingUnit(self):
81 """The generating unit specificaitons for the control area.
82 """
83 return self._ControlAreaGeneratingUnit
85 def setControlAreaGeneratingUnit(self, value):
86 for x in self._ControlAreaGeneratingUnit:
87 x.ControlArea = None
88 for y in value:
89 y._ControlArea = self
90 self._ControlAreaGeneratingUnit = value
92 ControlAreaGeneratingUnit = property(getControlAreaGeneratingUnit, setControlAreaGeneratingUnit)
94 def addControlAreaGeneratingUnit(self, *ControlAreaGeneratingUnit):
95 for obj in ControlAreaGeneratingUnit:
96 obj.ControlArea = self
98 def removeControlAreaGeneratingUnit(self, *ControlAreaGeneratingUnit):
99 for obj in ControlAreaGeneratingUnit:
100 obj.ControlArea = None
102 def getTieFlow(self):
103 """The tie flows associated with the control area.
105 return self._TieFlow
107 def setTieFlow(self, value):
108 for x in self._TieFlow:
109 x.ControlArea = None
110 for y in value:
111 y._ControlArea = self
112 self._TieFlow = value
114 TieFlow = property(getTieFlow, setTieFlow)
116 def addTieFlow(self, *TieFlow):
117 for obj in TieFlow:
118 obj.ControlArea = self
120 def removeTieFlow(self, *TieFlow):
121 for obj in TieFlow:
122 obj.ControlArea = None