Developer

Developer Documentation

Function Naming Guidelines

Following the Julia style guidelines, functions that mutate arguments should end with !. Following the JuMP style guidelines functions beginning with an _ are intended for internal package use only (i.e. similar private scope functions). Underscores are used to separate multi-word function names and the words should typically be ordered from general to more specific, so that alphabetical sorting clusters similar functions together.

Variable and Parameter Naming Guidelines

Suffixes

Power

Defining power $s = p + j \cdot q$ and $sm = |s|$

Voltage

Defining voltage $v = vm \angle va = vr + j \cdot vi$:

Current

Defining current $c = cm \angle ca = cr + j \cdot ci$:

Voltage products

Defining voltage product $w = v_i \cdot v_j$ then $w = wm \angle wa = wr + j\cdot wi$:

Current products

Defining current product $cc = c_i \cdot c_j$ then $cc = ccm \angle cca = ccr + j\cdot cci$:

Transformer ratio

Defining complex transformer ratio $t = tm \angle ta = tr + j\cdot ti$:

Impedance

Defining impedance $z = r + j\cdot x$:

Admittance

Defining admittance $y = g + j\cdot b$:

Standard Value Names

DistFlow derivation

For an asymmetric pi section

Following notation of [1], but recognizing it derives the SOC BFM without shunts. In a pi-section, part of the total current $I_{lij}$ at the from side flows through the series impedance, $I^{s}_{lij}$, part of it flows through the from side shunt admittance $I^{sh}_{lij}$. Vice versa for the to-side. Indicated by superscripts 's' (series) and 'sh' (shunt).

Power flow balance w.r.t. branch total losses

Substitution:

Note that $l^{s}_{l}$ represents squared magnitude of the series current, i.e. the current flow through the series impedance in the pi-model.

Power flow balance w.r.t. branch total losses

Power flow balance w.r.t. branch series losses:

Valid equality to link $w_{i}, l_{lij}, P^{s}_{lij}, Q^{s}_{lij}$:

Adding an ideal transformer

Adding an ideal transformer at the from side implicitly creates an internal branch voltage, between the transformer and the pi-section.

W.r.t to the pi-section only formulation, we effectively perform the following substitution in all the equations above:

The branch's power balance isn't otherwise impacted by adding the ideal transformer, as such transformer is lossless.

Adding total current limits

In squared voltage magnitude variables:

[1] Gan, L., Li, N., Topcu, U., & Low, S. (2012). Branch flow model for radial networks: convex relaxation. 51st IEEE Conference on Decision and Control, 1–8. Retrieved from http://smart.caltech.edu/papers/ExactRelaxation.pdf