Private Functions
Distances
SyntheticGrids.haversine
— Function.haversine{T<:Real}(c1::Tuple{T,T}, c2::Tuple{T,T})
Compute distance between two pairs of latitude and longitude using the haversine formula.
haversine(b1::Bus, b2::Bus)
Compute distance between two buses from their latitude and longitude using the haversine formula.
SyntheticGrids.subs_dist
— Function.subs_dist(inds1, inds2, buses, b_dist)
Compute distance between two substations using equation 1 from the REFERENCE.
REFERENCE: Birchfield, Adam B., et al. "Grid Structural Characteristics as Validation Criteria for Synthetic Networks." IEEE Transactions on Power Systems (2016).
Topology building
SyntheticGrids.twst!
— Function.twst!(grid, k)
Execute Tunable Weight Spannning Tree algorithm for the grid using weight 'k'.
REFERENCE: Soltan, Saleh, and Gil Zussman. "Generation of synthetic spatially embedded power grid networks." arXiv:1508.04447 [cs.SY], Aug. 2015.
SyntheticGrids.reinforce!
— Function.reinforce!(grid, m, a, b, g, t, N)
Execute the Reinforcement procedure to increase robustness of a grid.
Arguments:
m: total number of connections
a, b, g, t: paramaters of the model (see REFERENCE)
N: number of nearest neighbors in the average distance computation
REFERENCE: Soltan, Saleh, and Gil Zussman. "Generation of synthetic spatially embedded power grid networks." arXiv:1508.04447 [cs.SY], Aug. 2015.
SyntheticGrids.connect_buses!
— Function.connect_buses!(grid)
Create reference links between buses that are connected according to the connectivity matrix of the grid.
SyntheticGrids.connect_subs!
— Function.connect_subs!(grid)
Determine which substations are connected to each other through their buses.
SyntheticGrids.cluster_loads!
— Function.cluster_loads!(grid,nload)
Execute aglomerative clustering of all load buses into 'nload' substations using geographic distances as metric.
SyntheticGrids.fill_gen!
— Function.fill_gen!(sub, gens, MW)
Group generators ('gens') into substations ('subs') by geographic proximity until generation threshold 'MW' is reached.
SyntheticGrids.cluster_load_gen!
— Function.cluster_load_gen!(grid, nboth)
Create 'nboth' substations with both load and generation, chosen randomly.
SyntheticGrids.cluster_gens!
— Function.cluster_gens!(grid, ngen)
Execute aglomerative clustering of generators into 'ngen' substations.
Graphs
SyntheticGrids.laplacian
— Function.laplacian(con_mat::AbstractMatrix{<:Real})
Return the Laplacian matrix for a graph defined by adjacency matrix con_mat
.
SyntheticGrids.dijkstra
— Function.dijkstra(con_mat::AbstractMatrix{<:Real}, v1)
Compute minimum distances to each node in the network with connectivity matrix con_mat, starting from node v1, using Dijkstra's algorithm.
SyntheticGrids.floyd_warshall
— Function.floyd_warshall(weights::AbstractMatrix{<:Real})
Compute minimum distances to each node in the network using Floyd-Warshall's algorithm. Here we assume that the weigths matrix is symmetric.
Transmission Line properties
SyntheticGrids.linear_imped
— Function.linear_imped(a::Bus, b::Bus)
Return an impedance value for a transmission line connecting buses a
and b
, using a simple linear approximation. This value is loosely based on the two references below. Values based on resistances for dc currents at 50C and 350kV lines.
REF 1: Electric Power Research Institute (EPRI). Transmission Line Reference Book, 345 kV and Above. Palo Alto, CA: The Institute, 1975. REF 2: J. Glover, M. Sarma and T. Overbye, Power System Analysis and Design. Stamford, CT: Cengage Learning, 2012.
SyntheticGrids.rand_imped
— Function.rand_imped(a::Bus, b::Bus)
Return an impedance value for a transmission line connecting buses a
and b
, using a simple linear approximation with a randomly chosen coefficient. The range we adopted is based on the values for ACSR cables from the ref: J. Glover, M. Sarma and T. Overbye, Power System Analysis and Design. Stanford, CT: Cengage Learning, 2012.
SyntheticGrids.volt_cap
— Function.volt_cap(a::Bus, b::Bus)
Return a current carrying capacity value for a transmission line connecting buses a
and b
based on their operating voltages. This value is loosely based on the reference: Electric Power Research Institute (EPRI). Transmission Line Reference Book, 345 kV and Above. Palo Alto, CA: The Institute, 1975.