From 8f1dba985805dabc809b5ca31a47f81984222842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20St=C3=BCrmer?= <julianstuermer2@gmail.com> Date: Fri, 13 Nov 2020 12:23:25 +0100 Subject: [PATCH] Add methods for generating NDDs for Texas --- applications/Texas/Texas_NDD.jl | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 applications/Texas/Texas_NDD.jl diff --git a/applications/Texas/Texas_NDD.jl b/applications/Texas/Texas_NDD.jl new file mode 100644 index 0000000..cdd6ed5 --- /dev/null +++ b/applications/Texas/Texas_NDD.jl @@ -0,0 +1,40 @@ +#* Generating the network data dictionary for the synthetic power grid of Texas +#*------------------------------------------------------------------------------ + +using ITCPG +using PowerModels +using JLD2 +using FileIO + +#*------------------------------------------------------------------------------ + +#= +Reads the power grid data for Texas saved in the .RAW file and generates a network data dictionary (NDD) of PowerModels.jl. The NDD includes an AC power flow solution calculated with PowerModels.jl and geographic bus locations. The resulting NDD is saved in a .jld2 file. +=# +function build_Texas_ac_NDD() + rawfile = joinpath(@__DIR__, "./Data/ACTIVSg2000.RAW") + network_data = calc_init_op(rawfile, model=:ac) # get NDD with AC-PF + busfile = joinpath(@__DIR__, "./Data/Texas_BusData.csv") + addlocs!(network_data, busfile) # add geographic bus locations + + acpath = joinpath(@__DIR__, "./Results/ACPF/Texas_init_ac_op.jld2") + save(acpath, "network_data", network_data) # save NDD + return nothing +end + +#= +Reads the power grid data for Texas saved in the .RAW file and generates a network data dictionary (NDD) of PowerModels.jl. The NDD includes an AC power flow solution calculated with PowerModels.jl and geographic bus locations. The resulting NDD is saved in a .jld2 file. +=# +function build_Texas_dc_NDD() + rawfile = joinpath(@__DIR__, "./Data/ACTIVSg2000.RAW") + network_data = calc_init_op(rawfile, model=:dc) # get NDD with DC-PF + busfile = joinpath(@__DIR__, "./Data/Texas_BusData.csv") + addlocs!(network_data, busfile) # add geographic bus locations + + acpath = joinpath(@__DIR__, "./Results/DCPF/Texas_init_dc_op.jld2") + save(acpath, "network_data", network_data) # save NDD + return nothing +end + +build_Texas_ac_NDD() +build_Texas_dc_NDD() \ No newline at end of file -- GitLab