Topology_BusBranch module

This module contains definitions of classes to represent an object oriented structure of a Matpower case file.

Date:2016-05-10
Authors:Konstantin Gerasimov
e-mail:kkgerasimov@gmail.com
Credits:This function is created for KU-Leuven as part of the GARPUR project http://www.garpur-project.eu
class Topology_BusBranch.Branch(from_bus, to_bus, name='', r=0.0, x=0.0, b=0.0, rate_a=0.0, rate_b=0.0, rate_c=0.0, ratio=0.0, angle=0.0, angle_min=-360.0, angle_max=360.0, online=True, p_from=0.0, q_from=0.0, p_to=0.0, q_to=0.0)[source]

A Branch represents a vertex in a Bus/Branch network.

angle = None

Transformer phase shift angle (degree, positive => delay)

angle_max = None

Maximum angle difference between both ends (from_bus.va - to_bus.va) (degree)

angle_min = None

Minimum angle difference between both ends (from_bus.va - to_bus.va) (degree)

b = None

Total line charging susceptance (p.u.)

from_bus = None

Reference to the bus on the from-side

name = None

Branch name

online = None

Initial branch status (in service (True) or out of service (False))

p_from = None

Real power injected at “from” bus end (MW)

p_to = None

Real power injected at “to” bus end (MW)

q_from = None

Reactive power injected at “from” bus end (MVAr)

q_to = None

Reactive power injected at “to” bus end (MVAr)

r = None

Resistance (p.u.)

rate_a = None

MVA rating A (long term rating)

rate_b = None

MVA rating B (short term rating)

rate_c = None

MVA rating C (emergency rating)

ratio = None

Transformer off nominal turns ratio (=0 for lines)

to_bus = None

Reference to the bus on the to-side

x = None

Reactance (p.u.)

class Topology_BusBranch.Bus(name='', btype=1, pd=0.0, qd=0.0, base_kv=100.0, vm=1.0, va=0.0, vm_max=1.1, vm_min=0.9, gs=0.0, bs=0.0, area=1, zone=1)[source]

A Bus represents a node in a bus/branch network graph.

area = None

Area number (positive integer)

base_kv = None

Base voltage (kV)

bs = None

Shunt susceptance (MVAr injected at V = 1. p.u.)

btype = None

Bus type (One of these attributes of bus_type: PQ, PV, REF, ISOLATED)

gs = None

Shunt conductance (MVAr injected at V = 1. p.u.)

id = None

Autogenerated ID (subsequent numbering, starting from 1)

id_generator = count(1)
name = None

Bus name

pd = None

Active power demand (MW)

pd_orig

The value of self.pd when the instance was created.

qd = None

Reactive power demand (MVAr)

qd_orig

The value of self.qd when the instance was created.

reset()[source]

Resets self.pd and self.qd to their original values (that they had when the instance was created).

va = None

Voltage angle (degrees)

vm = None

Voltage magnitude (p.u.)

vm_max = None

maximum voltage magnitude (p.u.)

vm_min = None

minimum voltage magnitude (p.u.)

zone = None

Loss zone (positive integer)

class Topology_BusBranch.Case(base_mva, buses, generators, branches)[source]

Case is a container for :class:`Bus`es, :class:`Generator`s and :class:`Branch`es.

It also holds the global base_mva attribute for the case.

reset()[source]

Resets all buses and generators.

class Topology_BusBranch.Generator(bus, name='', pg=0.0, qg=0.0, pg_min=0.0, pg_max=0.0, qg_min=0.0, qg_max=0.0, vg=1.0, base_mva=0.0, online=True, pc1=0.0, pc2=0.0, qc1_min=0.0, qc1_max=0.0, qc2_min=0.0, qc2_max=0.0, ramp_agc=0.0, ramp_10=0.0, ramp_30=0.0, ramp_q=0.0, apf=0.0)[source]

A Generator can be attached to a Bus.

apf = None

APF, area participation factor

base_mva = None

Total MVA base of this machine, defaults to baseMVA

bus = None

Reference to the bus the generator is connected to

name = None

Generator name

online = None

Status (machine in service (True) or out of service (False))

pc1 = None

Lower real power output of PQ capability curve (MW)

pc2 = None

Upper real power output of PQ capability curve (MW)

pg = None

Real power output (MW)

pg_max = None

Maximum real power output (MW)

pg_min = None

Minimum real power output (MW)

pg_orig

The value of self.pg when the instance was created.

qc1_max = None

Maximum reactive power output at Pc1 (MVAr)

qc1_min = None

Minimum reactive power output at Pc1 (MVAr)

qc2_max = None

Maximum reactive power output at Pc2 (MVAr)

qc2_min = None

Minimum reactive power output at Pc2 (MVAr)

qg = None

Reactive power output (MVAr)

qg_max = None

Maximum reactive power output at Pc1 (MVAr)

qg_min = None

Minimum reactive power output at Pc1 (MVAr)

qg_orig

The value of self.qg when the instance was created.

ramp_10 = None

Ramp rate for 10 minute reserves (MW)

ramp_30 = None

Ramp rate for 30 minute reserves (MW)

ramp_agc = None

Ramp rate for load following/AGC (MW/min)

ramp_q = None

Ramp rate for reactive power (2 sec timescale) (MVAr/min)

reset()[source]

Resets self.pg and self.qg to their original values (that they had when the instance was created).

vg = None

Voltage magnitude setpoint (p.u.)

class Topology_BusBranch.Point(x, y)
_asdict()

Return a new OrderedDict which maps field names to their values

_fields = ('x', 'y')
classmethod _make(iterable, new=<built-in method __new__ of type object at 0x000000001E2A0E50>, len=<built-in function len>)

Make a new Point object from a sequence or iterable

_replace(_self, **kwds)

Return a new Point object replacing specified fields with new values

x

Alias for field number 0

y

Alias for field number 1

Topology_BusBranch.bus_type = BusType(PQ=1, PV=2, REF=3, ISOLATED=4)

Defines the Matpower BUS_TYPE constants