BaseVoltage.py 1.8 KB
Newer Older
1
from cimpy.cgmes_v2_4_15.IdentifiedObject import IdentifiedObject
2
3
4
5
6
7
8


class BaseVoltage(IdentifiedObject):
	'''
	Defines a system base voltage which is referenced.

	:nominalVoltage: The power system resource's base voltage. Default: 0.0
9
10
11
12
	:ConductingEquipment: Base voltage of this conducting equipment.  Use only when there is no voltage level container used and only one base voltage applies.  For example, not used for transformers. Default: "many"
	:VoltageLevel: The voltage levels having this base voltage. Default: "many"
	:TransformerEnds: Transformer ends at the base voltage.  This is essential for PU calculation. Default: "many"
	:TopologicalNode: The topological nodes at the base voltage. Default: "many"
13
14
		'''

15
16
	cgmesProfile = IdentifiedObject.cgmesProfile

Philipp Reuber's avatar
Philipp Reuber committed
17
18
19
20
21
22
23
24
	possibleProfileList = {'class': [cgmesProfile.EQ.value, cgmesProfile.TP.value, ],
						'nominalVoltage': [cgmesProfile.EQ.value, ],
						'ConductingEquipment': [cgmesProfile.EQ.value, ],
						'VoltageLevel': [cgmesProfile.EQ.value, ],
						'TransformerEnds': [cgmesProfile.EQ.value, ],
						'TopologicalNode': [cgmesProfile.TP.value, ],
						 }

25
	serializationProfile = {}
26
27
28

	__doc__ += '\n Documentation of parent class IdentifiedObject: \n' + IdentifiedObject.__doc__ 

29
	def __init__(self, nominalVoltage = 0.0, ConductingEquipment = "many", VoltageLevel = "many", TransformerEnds = "many", TopologicalNode = "many",  *args, **kw_args):
30
31
32
33
34
35
36
37
38
39
40
41
42
43
		super().__init__(*args, **kw_args)
	
		self.nominalVoltage = nominalVoltage
		self.ConductingEquipment = ConductingEquipment
		self.VoltageLevel = VoltageLevel
		self.TransformerEnds = TransformerEnds
		self.TopologicalNode = TopologicalNode
		
	def __str__(self):
		str = 'class=BaseVoltage\n'
		attributes = self.__dict__
		for key in attributes.keys():
			str = str + key + '={}\n'.format(attributes[key])
		return str