Skip to content

Commit

Permalink
correct residual capacity concat
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorb1 committed Oct 6, 2024
1 parent 754705e commit ea6f89a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ def set_user_defined_capacity(tech_capacity, op_life_dict, df_tech_set,
'YEAR',
'VALUE']]

df_res_cap = pd.concat([df_res_cap, df_res_cap_ud_final
if not df_res_cap_ud_final.empty else None])
if not df_res_cap_ud_final.empty:
df_res_cap = pd.concat([df_res_cap, df_res_cap_ud_final])
df_res_cap = df_res_cap.groupby(by=["REGION", "TECHNOLOGY", "YEAR"], as_index=False).sum()

# For technologies with start year at or after model start year, add to
# TotalAnnualMinCapacityInvestment
Expand Down
12 changes: 6 additions & 6 deletions workflow/scripts/osemosys_global/transmission/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ def main(
output_data_dir = 'results/data'
input_data_dir = 'resources/data'
powerplant_data_dir = 'results/data/powerplant'
file_iar_base = f'{powerplant_data_dir}/InputActivityRatio'
file_oar_base = f'{powerplant_data_dir}/OutputActivityRatio'
file_capact_base = f'{powerplant_data_dir}/CapacityToActivityUnit'
file_cap_cost_base = f'{powerplant_data_dir}/CapitalCost'
file_fix_cost_base = f'{powerplant_data_dir}/FixedCost'
file_op_life_base = f'{powerplant_data_dir}/OperationalLife'
file_iar_base = f'{powerplant_data_dir}/InputActivityRatio.csv'
file_oar_base = f'{powerplant_data_dir}/OutputActivityRatio.csv'
file_capact_base = f'{powerplant_data_dir}/CapacityToActivityUnit.csv'
file_cap_cost_base = f'{powerplant_data_dir}/CapitalCost.csv'
file_fix_cost_base = f'{powerplant_data_dir}/FixedCost.csv'
file_op_life_base = f'{powerplant_data_dir}/OperationalLife.csv'
file_max_cap_invest_base = f'{powerplant_data_dir}/TotalAnnualMaxCapacityInvestment.csv'
file_min_cap_invest_base = f'{powerplant_data_dir}/TotalAnnualMinCapacityInvestment.csv'
file_res_cap_base = f'{powerplant_data_dir}/ResidualCapacity.csv'
Expand Down

0 comments on commit ea6f89a

Please sign in to comment.