diff --git a/applications/Texas/Texas_NDD.jl b/applications/Texas/Texas_NDD.jl new file mode 100644 index 0000000000000000000000000000000000000000..cdd6ed5e4e8dc9e3fbe49300268343b49ce20846 --- /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