Fixing website and API documentation links
[PyCIM.git] / CIM14 / CDPSM / GIS_Connectivity / IEC61970 / Generation / Production / GeneratingUnit.py
blob1647a134f0be68d857e2a3e9ca2dc7a97382edbd
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.GIS_Connectivity.IEC61970.Core.Equipment import Equipment
23 class GeneratingUnit(Equipment):
24 """A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set.
25 """
27 def __init__(self, ratedNetMaxP=0.0, genControlSource="onAGC", initialP=0.0, SynchronousMachines=None, *args, **kw_args):
28 """Initialises a new 'GeneratingUnit' instance.
30 @param ratedNetMaxP: The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity
31 @param genControlSource: The source of controls for a generating unit. Values are: "onAGC", "unavailable", "plantControl", "offAGC"
32 @param initialP: Default Initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration
33 @param SynchronousMachines: A synchronous machine may operate as a generator and as such becomes a member of a generating unit
34 """
35 #: The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity
36 self.ratedNetMaxP = ratedNetMaxP
38 #: The source of controls for a generating unit. Values are: "onAGC", "unavailable", "plantControl", "offAGC"
39 self.genControlSource = genControlSource
41 #: Default Initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration
42 self.initialP = initialP
44 self._SynchronousMachines = []
45 self.SynchronousMachines = [] if SynchronousMachines is None else SynchronousMachines
47 super(GeneratingUnit, self).__init__(*args, **kw_args)
49 _attrs = ["ratedNetMaxP", "genControlSource", "initialP"]
50 _attr_types = {"ratedNetMaxP": float, "genControlSource": str, "initialP": float}
51 _defaults = {"ratedNetMaxP": 0.0, "genControlSource": "onAGC", "initialP": 0.0}
52 _enums = {"genControlSource": "GeneratorControlSource"}
53 _refs = ["SynchronousMachines"]
54 _many_refs = ["SynchronousMachines"]
56 def getSynchronousMachines(self):
57 """A synchronous machine may operate as a generator and as such becomes a member of a generating unit
58 """
59 return self._SynchronousMachines
61 def setSynchronousMachines(self, value):
62 for x in self._SynchronousMachines:
63 x.GeneratingUnit = None
64 for y in value:
65 y._GeneratingUnit = self
66 self._SynchronousMachines = value
68 SynchronousMachines = property(getSynchronousMachines, setSynchronousMachines)
70 def addSynchronousMachines(self, *SynchronousMachines):
71 for obj in SynchronousMachines:
72 obj.GeneratingUnit = self
74 def removeSynchronousMachines(self, *SynchronousMachines):
75 for obj in SynchronousMachines:
76 obj.GeneratingUnit = None