Skip to content
Snippets Groups Projects
Commit f742ae19 authored by Julian Stürmer's avatar Julian Stürmer
Browse files

Remove get_locs and add plot_pg_map

parent a5ed3cb7
No related branches found
No related tags found
No related merge requests found
......@@ -30,34 +30,6 @@ function add_locs!(
return network_data
end
#=
Returns a dictionary containing geographic bus locations that are included in the NDD. The dicitonary structure is bus-index => (lon, lat). If getlims=true, the minmimum and maximum longitude and latitude coordinates are returned as well. Can be useful for plotting the grid.
=#
function get_locs(network_data::Dict{String,<:Any}; getlims=false)
pos = Dict(
parse(Int64, i) => (b["bus_lon"], b["bus_lat"])
for (i, b) in network_data["bus"]
)
### Check whether to return lon- and lat-limits or not
if getlims == true
N = length(network_data["bus"]) # number of buses
lats = [
network_data["bus"]["$i"]["bus_lat"]
for i in keys(network_data["bus"])
] # latitudes
lons = [
network_data["bus"]["$i"]["bus_lon"]
for i in keys(network_data["bus"])
] # longitudes
xlims = (minimum(lons), maximum(lons))
ylims = (minimum(lats), maximum(lats))
return pos, xlims, ylims
else
return pos
end
end
#*------------------------------------------------------------------------------
#=
......
......@@ -16,12 +16,12 @@ using DataStructures
#* Include other code files and export functions
include("Data.jl")
export add_locs!, get_locs, add_tl_voltages!, get_bustypes
export add_locs!, add_tl_voltages!, get_bustypes
include("PowerFlow.jl")
export update_pf_data!, calc_init_op
include("PlotPG.jl")
export plot_pg
export plot_pg_map, plot_pg
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment