Adding class meta-data attributes.
[PyCIM.git] / schemata / CIM14 / IEC61970 / Generation / Production / AirCompressor.py
blob62a21dd502f524267d7c12154df4582501b9b29a
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 AirCompressor(PowerSystemResource):
20 """Combustion turbine air compressor which is an integral part of a compressed air energy storage (CAES) plant
21 """
23 def __init__(self, airCompressorRating=0.0, CAESPlant=None, CombustionTurbine=None, *args, **kw_args):
24 """Initialises a new 'AirCompressor' instance.
26 @param airCompressorRating: Rating of the CAES air compressor
27 @param CAESPlant: An air compressor may be a member of a compressed air energy storage plant
28 @param CombustionTurbine: A CAES air compressor is driven by combustion turbine
29 """
30 #: Rating of the CAES air compressor
31 self.airCompressorRating = airCompressorRating
33 self._CAESPlant = None
34 self.CAESPlant = CAESPlant
36 self._CombustionTurbine = None
37 self.CombustionTurbine = CombustionTurbine
39 super(AirCompressor, self).__init__(*args, **kw_args)
41 _attrs = ["airCompressorRating"]
42 _attr_types = {"airCompressorRating": float}
43 _defaults = {"airCompressorRating": 0.0}
44 _enums = {}
45 _refs = ["CAESPlant", "CombustionTurbine"]
46 _many_refs = []
48 def getCAESPlant(self):
49 """An air compressor may be a member of a compressed air energy storage plant
50 """
51 return self._CAESPlant
53 def setCAESPlant(self, value):
54 if self._CAESPlant is not None:
55 self._CAESPlant._AirCompressor = None
57 self._CAESPlant = value
58 if self._CAESPlant is not None:
59 self._CAESPlant._AirCompressor = self
61 CAESPlant = property(getCAESPlant, setCAESPlant)
63 def getCombustionTurbine(self):
64 """A CAES air compressor is driven by combustion turbine
65 """
66 return self._CombustionTurbine
68 def setCombustionTurbine(self, value):
69 if self._CombustionTurbine is not None:
70 self._CombustionTurbine._AirCompressor = None
72 self._CombustionTurbine = value
73 if self._CombustionTurbine is not None:
74 self._CombustionTurbine._AirCompressor = self
76 CombustionTurbine = property(getCombustionTurbine, setCombustionTurbine)