11"""
2- Power Transfer Distribution Factors (PTDF) indicate the incremental change in
3- real power that occurs on transmission lines due to real power injections
2+ Power Transfer Distribution Factors (PTDF) indicate the incremental change in
3+ real power that occurs on transmission lines due to real power injections
44changes at the buses.
55
66The PTDF struct is indexed using the Bus numbers and Branch names.
@@ -13,7 +13,7 @@ The PTDF struct is indexed using the Bus numbers and Branch names.
1313 the second showing the branch names. The information contained in this
1414 field matches the axes of the fiels `data`.
1515- `lookup<:NTuple{2, Dict}`:
16- Tuple containing two dictionaries mapping the bus numbers and branch
16+ Tuple containing two dictionaries mapping the bus numbers and branch
1717 names with the indices of the matrix contained in `data`.
1818- `subnetworks::Dict{Int, Set{Int}}`:
1919 dictionary containing the set of bus indexes defining the subnetworks
@@ -42,7 +42,7 @@ PTDF(filename::AbstractString) = from_hdf5(PTDF, filename)
4242
4343function _buildptdf (
4444 branches,
45- buses:: Vector{PSY.Bus } ,
45+ buses:: Vector{PSY.ACBus } ,
4646 bus_lookup:: Dict{Int, Int} ,
4747 dist_slack:: Vector{Float64} ,
4848 linear_solver:: String )
@@ -154,7 +154,7 @@ Computes the PTDF matrix by means of the KLU.LU factorization for sparse matrice
154154# Arguments
155155- `branches`:
156156 vector of the System AC branches
157- - `buses::Vector{PSY.Bus }`:
157+ - `buses::Vector{PSY.ACBus }`:
158158 vector of the System buses
159159- `bus_lookup::Dict{Int, Int}`:
160160 dictionary mapping the bus numbers with their enumerated indexes.
@@ -163,7 +163,7 @@ Computes the PTDF matrix by means of the KLU.LU factorization for sparse matrice
163163"""
164164function calculate_PTDF_matrix_KLU (
165165 branches,
166- buses:: Vector{PSY.Bus } ,
166+ buses:: Vector{PSY.ACBus } ,
167167 bus_lookup:: Dict{Int, Int} ,
168168 dist_slack:: Vector{Float64} )
169169 A, ref_bus_positions = calculate_A_matrix (branches, buses)
@@ -252,7 +252,7 @@ Computes the PTDF matrix by means of the LAPACK and BLAS functions for dense mat
252252# Arguments
253253- `branches`:
254254 vector of the System AC branches
255- - `buses::Vector{PSY.Bus }`:
255+ - `buses::Vector{PSY.ACBus }`:
256256 vector of the System buses
257257- `bus_lookup::Dict{Int, Int}`:
258258 dictionary mapping the bus numbers with their enumerated indexes.
@@ -261,7 +261,7 @@ Computes the PTDF matrix by means of the LAPACK and BLAS functions for dense mat
261261"""
262262function calculate_PTDF_matrix_DENSE (
263263 branches,
264- buses:: Vector{PSY.Bus } ,
264+ buses:: Vector{PSY.ACBus } ,
265265 bus_lookup:: Dict{Int, Int} ,
266266 dist_slack:: Vector{Float64} )
267267 A, ref_bus_positions = calculate_A_matrix (branches, buses)
@@ -336,7 +336,7 @@ Computes the PTDF matrix by means of the MKL Pardiso for dense matrices.
336336# Arguments
337337- `branches`:
338338 vector of the System AC branches
339- - `buses::Vector{PSY.Bus }`:
339+ - `buses::Vector{PSY.ACBus }`:
340340 vector of the System buses
341341- `bus_lookup::Dict{Int, Int}`:
342342 dictionary mapping the bus numbers with their enumerated indexes.
@@ -345,7 +345,7 @@ Computes the PTDF matrix by means of the MKL Pardiso for dense matrices.
345345"""
346346function calculate_PTDF_matrix_MKLPardiso (
347347 branches,
348- buses:: Vector{PSY.Bus } ,
348+ buses:: Vector{PSY.ACBus } ,
349349 bus_lookup:: Dict{Int, Int} ,
350350 dist_slack:: Vector{Float64} )
351351 A, ref_bus_positions = calculate_A_matrix (branches, buses)
@@ -360,7 +360,7 @@ Builds the PTDF matrix from a group of branches and buses. The return is a PTDF
360360# Arguments
361361- `branches`:
362362 vector of the System AC branches
363- - `buses::Vector{PSY.Bus }`:
363+ - `buses::Vector{PSY.ACBus }`:
364364 vector of the System buses
365365- `dist_slack::Vector{Float64}`:
366366 vector of weights to be used as distributed slack bus.
@@ -372,7 +372,7 @@ Builds the PTDF matrix from a group of branches and buses. The return is a PTDF
372372"""
373373function PTDF (
374374 branches,
375- buses:: Vector{PSY.Bus } ;
375+ buses:: Vector{PSY.ACBus } ;
376376 dist_slack:: Vector{Float64} = Float64[],
377377 linear_solver:: String = " KLU" ,
378378 tol:: Float64 = eps ())
0 commit comments