Adding class meta-data attributes.
[PyCIM.git] / schemata / CIM14 / IEC61970 / Wires / VoltageControlZone.py
blob6483161746f10b5ae5ddac69d1a6bf420ef8c8a2
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.PowerSystemResource import PowerSystemResource
19 class VoltageControlZone(PowerSystemResource):
20 """An area of the power system network which is defined for secondary voltage control purposes. A voltage control zone consists of a collection of substations with a designated bus bar section whose voltage will be controlled.
21 """
23 def __init__(self, RegulationSchedule=None, BusbarSection=None, *args, **kw_args):
24 """Initialises a new 'VoltageControlZone' instance.
26 @param RegulationSchedule: A VoltageControlZone may have a voltage regulation schedule.
27 @param BusbarSection: A VoltageControlZone is controlled by a designated BusbarSection.
28 """
29 self._RegulationSchedule = None
30 self.RegulationSchedule = RegulationSchedule
32 self._BusbarSection = None
33 self.BusbarSection = BusbarSection
35 super(VoltageControlZone, self).__init__(*args, **kw_args)
37 _attrs = []
38 _attr_types = {}
39 _defaults = {}
40 _enums = {}
41 _refs = ["RegulationSchedule", "BusbarSection"]
42 _many_refs = []
44 def getRegulationSchedule(self):
45 """A VoltageControlZone may have a voltage regulation schedule.
46 """
47 return self._RegulationSchedule
49 def setRegulationSchedule(self, value):
50 if self._RegulationSchedule is not None:
51 filtered = [x for x in self.RegulationSchedule.VoltageControlZones if x != self]
52 self._RegulationSchedule._VoltageControlZones = filtered
54 self._RegulationSchedule = value
55 if self._RegulationSchedule is not None:
56 self._RegulationSchedule._VoltageControlZones.append(self)
58 RegulationSchedule = property(getRegulationSchedule, setRegulationSchedule)
60 def getBusbarSection(self):
61 """A VoltageControlZone is controlled by a designated BusbarSection.
62 """
63 return self._BusbarSection
65 def setBusbarSection(self, value):
66 if self._BusbarSection is not None:
67 self._BusbarSection._VoltageControlZone = None
69 self._BusbarSection = value
70 if self._BusbarSection is not None:
71 self._BusbarSection._VoltageControlZone = self
73 BusbarSection = property(getBusbarSection, setBusbarSection)