Skip to content

Commit

Permalink
adjust all rps col names to From_state
Browse files Browse the repository at this point in the history
  • Loading branch information
zoe667 committed Dec 20, 2023
1 parent 5206412 commit 9b7edb4
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ModelCases/MD_Excel_case/output/es_power_hourly.csv

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions ModelCases/MD_Excel_case/output/power_hourly.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/GTEP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function create_GTEP_model(config_set::Dict,input_data::Dict,OPTIMIZER::MOI.Opti
PT_emis=10^9 #Carbon emission volitation penalty, $/t
P_min=[Gendata[:,"Pmin (MW)"];Gendata_candidate[:,"Pmin (MW)"]]#g #Minimum power generation of unit g, MW
P_max=[Gendata[:,"Pmax (MW)"];Gendata_candidate[:,"Pmax (MW)"]]#g #Maximum power generation of unit g, MW
RPS=Dict(zip(RPSdata[:,:State],RPSdata[:,:RPS])) #w #Renewable portfolio standard in state w, unitless
RPS=Dict(zip(RPSdata[:,:From_state],RPSdata[:,:RPS])) #w #Renewable portfolio standard in state w, unitless
RM=config_set["planning_reserve_margin"]# #Planning reserve margin, unitless
SECAP=[Estoragedata[:,"Capacity (MWh)"];Estoragedata_candidate[:,"Capacity (MWh)"]]#s #Maximum energy capacity of storage unit s, MWh
SCAP=[Estoragedata[:,"Max Power (MW)"];Estoragedata_candidate[:,"Max Power (MW)"]]#s #Maximum capacity of storage unit s, MWh
Expand Down Expand Up @@ -397,7 +397,7 @@ function solve_model(config_set::Dict, input_data::Dict, model::Model)
##read input for print
W=unique(input_data["Busdata"][:,"State"]) #Set of states, index w/w’
RPSdata = input_data["RPSdata"]
RPS=Dict(zip(RPSdata[:,:State],RPSdata[:,:RPS]))
RPS=Dict(zip(RPSdata[:,:From_state],RPSdata[:,:RPS]))
if model_mode == "GTEP"
Estoragedata_candidate = input_data["Estoragedata_candidate"]
Linedata_candidate = input_data["Linedata_candidate"]
Expand Down
4 changes: 2 additions & 2 deletions src/PCM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function create_PCM_model(config_set::Dict,input_data::Dict,OPTIMIZER::MOI.Optim
PT_emis=10^9 #Carbon emission volitation penalty, $/t
P_min=[Gendata[:,"Pmin (MW)"];]#g #Minimum power generation of unit g, MW
P_max=[Gendata[:,"Pmax (MW)"];]#g #Maximum power generation of unit g, MW
RPS=Dict(zip(RPSdata[:,:State],RPSdata[:,:RPS])) #w #Renewable portfolio standard in state w, unitless
RPS=Dict(zip(RPSdata[:,:From_state],RPSdata[:,:RPS])) #w #Renewable portfolio standard in state w, unitless
#RM=0.02# #Planning reserve margin, unitless
RM_SPIN_g = Dict(zip(G,Gendata[:,Symbol("RM_SPIN")]))
RU_g = Dict(zip(G,Gendata[:,Symbol("RU")]))
Expand Down Expand Up @@ -371,7 +371,7 @@ function solve_model(config_set::Dict, input_data::Dict, model::Model)# same as
##read input for print
W=unique(input_data["Busdata"][:,"State"]) #Set of states, index w/w’
RPSdata = input_data["RPSdata"]
RPS=Dict(zip(RPSdata[:,:State],RPSdata[:,:RPS]))
RPS=Dict(zip(RPSdata[:,:From_state],RPSdata[:,:RPS]))
if model_mode == "GTEP"
Estoragedata_candidate = input_data["Estoragedata_candidate"]
Linedata_candidate = input_data["Linedata_candidate"]
Expand Down
2 changes: 1 addition & 1 deletion src/Read_input_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function load_data(config_set::Dict,path::AbstractString)
input_data["NIdata"]=input_data["Loaddata"][:,"NI"]

#policies
println("Reading polices")
println("Reading policies")
input_data["CBPdata"]=CSV.read(joinpath(folderpath,"carbonpolicies.csv"),DataFrame)
#rpspolicydata=
input_data["RPSdata"]=CSV.read(joinpath(folderpath,"rpspolicies.csv"),DataFrame)
Expand Down

0 comments on commit 9b7edb4

Please sign in to comment.