gym_anm.simulator.components.branch.TransmissionLine

class gym_anm.simulator.components.branch.TransmissionLine(br_spec, baseMVA, bus_ids)[source]

Bases: object

A transmission line of an electric power grid.

f_bus

The sending end bus ID \(i\).

Type:

int

t_bus

The receiving end bus ID \(j\).

Type:

int

r

The transmission line resistance \(r_{ij}\) (p.u.).

Type:

float

x

The transmission line reactance \(x_{ij}\) (p.u.).

Type:

float

b

The transmission line susceptance \(b_{ij}\) (p.u.).

Type:

float

rate

The rate of the line \(\overline S_{ij}\) (p.u.).

Type:

float

tap_magn

The magnitude of the transformer tap \(\tau_{ij}\).

Type:

float

shift

The complex phase angle of the transformer \(\theta_{ij}\) (radians).

Type:

float

i_from, i_to

The complex current flows \(I_{ij}\) and \(I_{ji}\) (p.u.).

Type:

complex

p_from, p_to

The real power flows \(P_{ij}\) and \(P_{ji}\) in the line (p.u.).

Type:

float

q_from, q_to

The reactive power flows \(Q_{ij}\) and \(Q_{ji}\) in the line (p.u.).

Type:

float

s_apparent_max

The apparent power flow through the line, taken as the maximum of the apparent power injection at each end, with the sign indicating its direction (+ if \(P_{ij} \ge 0\); - otherwise) (p.u.).

Type:

float

series, shunt

The series \(y_{ij}\) and shunt \(y_{ij}^{sh}\) admittances of the line in the pi-model (p.u.).

Type:

complex

tap

The complex tap of the transformer \(t_{ij}\) (p.u.).

Type:

complex

__init__(br_spec, baseMVA, bus_ids)[source]
Parameters:
  • br_spec (numpy.ndarray) – The corresponding branch row in the network file describing the network.

  • baseMVA (int) – The base power of the system (MVA).

  • bus_ids (list of int) – The list of unique bus IDs.

Methods

__init__(br_spec, baseMVA, bus_ids)

param br_spec:

The corresponding branch row in the network file describing the

compute_currents(v_f, v_t)

Compute the complex current injections on the transmission line.

compute_power_flows(v_f, v_t)

Compute the power flows on the transmission line.

compute_currents(v_f, v_t)[source]

Compute the complex current injections on the transmission line.

Parameters:
  • v_f (np.complex) – The complex voltage at bus self.f_bus.

  • v_t (np.complex) – The complex voltage at bus self.t_bus.

compute_power_flows(v_f, v_t)[source]

Compute the power flows on the transmission line.

Parameters:
  • v_f (np.complex) – The complex voltage at bus self.f_bus (p.u.).

  • v_t (np.complex) – The complex voltage at bus self.t_bus (p.u.).