Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
91 changes: 91 additions & 0 deletions cimpy/cgmes_v3_0_0/ACDCConverter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
from .ConductingEquipment import ConductingEquipment


class ACDCConverter(ConductingEquipment):
'''
A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion.

:p: Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: 0.0
:q: Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: 0.0
:targetPpcc: Real power injection target in AC grid, at point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Default: 0.0
:targetUdc: Target value for DC voltage magnitude. The attribute shall be a positive value. Default: 0.0
:baseS: Base apparent power of the converter pole. The attribute shall be a positive value. Default: 0.0
:idleLoss: Active power loss in pole at no power transfer. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: 0.0
:maxUdc: The maximum voltage on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: 0.0
:minUdc: The minimum voltage on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: 0.0
:numberOfValves: Number of valves in the converter. Used in loss calculations. Default: 0
:ratedUdc: Rated converter DC voltage, also called UdN. The attribute shall be a positive value. It is converter`s configuration data used in power flow. For instance a bipolar HVDC link with value 200 kV has a 400kV difference between the dc lines. Default: 0.0
:resistiveLoss: It is converter`s configuration data used in power flow. Refer to poleLossP. The attribute shall be a positive value. Default: 0.0
:switchingLoss: Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. The attribute shall be a positive value. Default: 0.0
:valveU0: Valve threshold voltage, also called Uvalve. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: 0.0
:maxP: Maximum active power limit. The value is overwritten by values of VsCapabilityCurve, if present. Default: 0.0
:minP: Minimum active power limit. The value is overwritten by values of VsCapabilityCurve, if present. Default: 0.0
:PccTerminal: Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. Default: None
:DCTerminals: A DC converter have DC converter terminals. A converter has two DC converter terminals. Default: "list"
:idc: Converter DC current, also called Id. It is converter`s state variable, result from power flow. Default: 0.0
:poleLossP: The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2. For lossless operation Pdc=Pac. For rectifier operation with losses Pdc=Pac-lossP. For inverter operation with losses Pdc=Pac+lossP. It is converter`s state variable used in power flow. The attribute shall be a positive value. Default: 0.0
:uc: Line-to-line converter voltage, the voltage at the AC side of the valve. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: 0.0
:udc: Converter voltage at the DC side, also called Ud. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: 0.0
'''

cgmesProfile = ConductingEquipment.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.DY.value, cgmesProfile.SSH.value, cgmesProfile.EQ.value, cgmesProfile.SV.value, ],
'p': [cgmesProfile.SSH.value, ],
'q': [cgmesProfile.SSH.value, ],
'targetPpcc': [cgmesProfile.SSH.value, ],
'targetUdc': [cgmesProfile.SSH.value, ],
'baseS': [cgmesProfile.EQ.value, ],
'idleLoss': [cgmesProfile.EQ.value, ],
'maxUdc': [cgmesProfile.EQ.value, ],
'minUdc': [cgmesProfile.EQ.value, ],
'numberOfValves': [cgmesProfile.EQ.value, ],
'ratedUdc': [cgmesProfile.EQ.value, ],
'resistiveLoss': [cgmesProfile.EQ.value, ],
'switchingLoss': [cgmesProfile.EQ.value, ],
'valveU0': [cgmesProfile.EQ.value, ],
'maxP': [cgmesProfile.EQ.value, ],
'minP': [cgmesProfile.EQ.value, ],
'PccTerminal': [cgmesProfile.EQ.value, ],
'DCTerminals': [cgmesProfile.EQ.value, ],
'idc': [cgmesProfile.SV.value, ],
'poleLossP': [cgmesProfile.SV.value, ],
'uc': [cgmesProfile.SV.value, ],
'udc': [cgmesProfile.SV.value, ],
}

serializationProfile = {}

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

def __init__(self, p = 0.0, q = 0.0, targetPpcc = 0.0, targetUdc = 0.0, baseS = 0.0, idleLoss = 0.0, maxUdc = 0.0, minUdc = 0.0, numberOfValves = 0, ratedUdc = 0.0, resistiveLoss = 0.0, switchingLoss = 0.0, valveU0 = 0.0, maxP = 0.0, minP = 0.0, PccTerminal = None, DCTerminals = "list", idc = 0.0, poleLossP = 0.0, uc = 0.0, udc = 0.0, *args, **kw_args):
super().__init__(*args, **kw_args)

self.p = p
self.q = q
self.targetPpcc = targetPpcc
self.targetUdc = targetUdc
self.baseS = baseS
self.idleLoss = idleLoss
self.maxUdc = maxUdc
self.minUdc = minUdc
self.numberOfValves = numberOfValves
self.ratedUdc = ratedUdc
self.resistiveLoss = resistiveLoss
self.switchingLoss = switchingLoss
self.valveU0 = valveU0
self.maxP = maxP
self.minP = minP
self.PccTerminal = PccTerminal
self.DCTerminals = DCTerminals
self.idc = idc
self.poleLossP = poleLossP
self.uc = uc
self.udc = udc

def __str__(self):
str = 'class=ACDCConverter\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
34 changes: 34 additions & 0 deletions cimpy/cgmes_v3_0_0/ACDCConverterDCTerminal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from .DCBaseTerminal import DCBaseTerminal


class ACDCConverterDCTerminal(DCBaseTerminal):
'''
A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the AC side. The AC connection is inherited from the AC conducting equipment in the same way as any other AC equipment. The AC/DC converter DC terminal is separate from generic DC terminal to restrict the connection with the AC side to AC/DC converter and so that no other DC conducting equipment can be connected to the AC side.

:DCConductingEquipment: A DC converter terminal belong to an DC converter. Default: None
:polarity: Represents the normal network polarity condition. Depending on the converter configuration the value shall be set as follows: - For a monopole with two converter terminals use DCPolarityKind `positive` and `negative`. - For a bi-pole or symmetric monopole with three converter terminals use DCPolarityKind `positive`, `middle` and `negative`. Default: None
'''

cgmesProfile = DCBaseTerminal.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.SSH.value, cgmesProfile.TP.value, cgmesProfile.EQ.value, ],
'DCConductingEquipment': [cgmesProfile.EQ.value, ],
'polarity': [cgmesProfile.EQ.value, ],
}

serializationProfile = {}

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

def __init__(self, DCConductingEquipment = None, polarity = None, *args, **kw_args):
super().__init__(*args, **kw_args)

self.DCConductingEquipment = DCConductingEquipment
self.polarity = polarity

def __str__(self):
str = 'class=ACDCConverterDCTerminal\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
43 changes: 43 additions & 0 deletions cimpy/cgmes_v3_0_0/ACDCTerminal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from .IdentifiedObject import IdentifiedObject


class ACDCTerminal(IdentifiedObject):
'''
An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes.

:connected: The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: False
:Measurements: Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: "list"
:sequenceNumber: The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0
:OperationalLimitSet: The operational limit sets at the terminal. Default: "list"
:BusNameMarker: The bus name marker used to name the bus (topological node). Default: None
'''

cgmesProfile = IdentifiedObject.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.DY.value, cgmesProfile.SSH.value, cgmesProfile.TP.value, cgmesProfile.OP.value, cgmesProfile.EQ.value, cgmesProfile.EQBD.value, cgmesProfile.SC.value, cgmesProfile.SV.value, ],
'connected': [cgmesProfile.SSH.value, ],
'Measurements': [cgmesProfile.OP.value, ],
'sequenceNumber': [cgmesProfile.EQ.value, ],
'OperationalLimitSet': [cgmesProfile.EQ.value, ],
'BusNameMarker': [cgmesProfile.EQ.value, ],
}

serializationProfile = {}

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

def __init__(self, connected = False, Measurements = "list", sequenceNumber = 0, OperationalLimitSet = "list", BusNameMarker = None, *args, **kw_args):
super().__init__(*args, **kw_args)

self.connected = connected
self.Measurements = Measurements
self.sequenceNumber = sequenceNumber
self.OperationalLimitSet = OperationalLimitSet
self.BusNameMarker = BusNameMarker

def __str__(self):
str = 'class=ACDCTerminal\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
61 changes: 61 additions & 0 deletions cimpy/cgmes_v3_0_0/ACLineSegment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
from .Conductor import Conductor


class ACLineSegment(Conductor):
'''
A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed three phase lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch.

:bch: Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: 0.0
:gch: Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: 0.0
:r: Positive sequence series resistance of the entire line section. Default: 0.0
:x: Positive sequence series reactance of the entire line section. Default: 0.0
:Clamp: The clamps connected to the line segment. Default: "list"
:Cut: Cuts applied to the line segment. Default: "list"
:b0ch: Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: 0.0
:g0ch: Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: 0.0
:r0: Zero sequence series resistance of the entire line section. Default: 0.0
:shortCircuitEndTemperature: Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909. Default: 0.0
:x0: Zero sequence series reactance of the entire line section. Default: 0.0
'''

cgmesProfile = Conductor.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.EQ.value, cgmesProfile.SC.value, ],
'bch': [cgmesProfile.EQ.value, ],
'gch': [cgmesProfile.EQ.value, ],
'r': [cgmesProfile.EQ.value, ],
'x': [cgmesProfile.EQ.value, ],
'Clamp': [cgmesProfile.EQ.value, ],
'Cut': [cgmesProfile.EQ.value, ],
'b0ch': [cgmesProfile.SC.value, ],
'g0ch': [cgmesProfile.SC.value, ],
'r0': [cgmesProfile.SC.value, ],
'shortCircuitEndTemperature': [cgmesProfile.SC.value, ],
'x0': [cgmesProfile.SC.value, ],
}

serializationProfile = {}

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

def __init__(self, bch = 0.0, gch = 0.0, r = 0.0, x = 0.0, Clamp = "list", Cut = "list", b0ch = 0.0, g0ch = 0.0, r0 = 0.0, shortCircuitEndTemperature = 0.0, x0 = 0.0, *args, **kw_args):
super().__init__(*args, **kw_args)

self.bch = bch
self.gch = gch
self.r = r
self.x = x
self.Clamp = Clamp
self.Cut = Cut
self.b0ch = b0ch
self.g0ch = g0ch
self.r0 = r0
self.shortCircuitEndTemperature = shortCircuitEndTemperature
self.x0 = x0

def __str__(self):
str = 'class=ACLineSegment\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
34 changes: 34 additions & 0 deletions cimpy/cgmes_v3_0_0/Accumulator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from .Measurement import Measurement


class Accumulator(Measurement):
'''
Accumulator represents an accumulated (counted) Measurement, e.g. an energy value.

:AccumulatorValues: The values connected to this measurement. Default: "list"
:LimitSets: A measurement may have zero or more limit ranges defined for it. Default: "list"
'''

cgmesProfile = Measurement.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.OP.value, ],
'AccumulatorValues': [cgmesProfile.OP.value, ],
'LimitSets': [cgmesProfile.OP.value, ],
}

serializationProfile = {}

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

def __init__(self, AccumulatorValues = "list", LimitSets = "list", *args, **kw_args):
super().__init__(*args, **kw_args)

self.AccumulatorValues = AccumulatorValues
self.LimitSets = LimitSets

def __str__(self):
str = 'class=Accumulator\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
34 changes: 34 additions & 0 deletions cimpy/cgmes_v3_0_0/AccumulatorLimit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from .Limit import Limit


class AccumulatorLimit(Limit):
'''
Limit values for Accumulator measurements.

:value: The value to supervise against. The value is positive. Default: 0
:LimitSet: The set of limits. Default: None
'''

cgmesProfile = Limit.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.OP.value, ],
'value': [cgmesProfile.OP.value, ],
'LimitSet': [cgmesProfile.OP.value, ],
}

serializationProfile = {}

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

def __init__(self, value = 0, LimitSet = None, *args, **kw_args):
super().__init__(*args, **kw_args)

self.value = value
self.LimitSet = LimitSet

def __str__(self):
str = 'class=AccumulatorLimit\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
34 changes: 34 additions & 0 deletions cimpy/cgmes_v3_0_0/AccumulatorLimitSet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from .LimitSet import LimitSet


class AccumulatorLimitSet(LimitSet):
'''
An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement.

:Measurements: The Measurements using the LimitSet. Default: "list"
:Limits: The limit values used for supervision of Measurements. Default: "list"
'''

cgmesProfile = LimitSet.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.OP.value, ],
'Measurements': [cgmesProfile.OP.value, ],
'Limits': [cgmesProfile.OP.value, ],
}

serializationProfile = {}

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

def __init__(self, Measurements = "list", Limits = "list", *args, **kw_args):
super().__init__(*args, **kw_args)

self.Measurements = Measurements
self.Limits = Limits

def __str__(self):
str = 'class=AccumulatorLimitSet\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
31 changes: 31 additions & 0 deletions cimpy/cgmes_v3_0_0/AccumulatorReset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from .Control import Control


class AccumulatorReset(Control):
'''
This command resets the counter value to zero.

:AccumulatorValue: The accumulator value that is reset by the command. Default: None
'''

cgmesProfile = Control.cgmesProfile

possibleProfileList = {'class': [cgmesProfile.OP.value, ],
'AccumulatorValue': [cgmesProfile.OP.value, ],
}

serializationProfile = {}

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

def __init__(self, AccumulatorValue = None, *args, **kw_args):
super().__init__(*args, **kw_args)

self.AccumulatorValue = AccumulatorValue

def __str__(self):
str = 'class=AccumulatorReset\n'
attributes = self.__dict__
for key in attributes.keys():
str = str + key + '={}\n'.format(attributes[key])
return str
Loading