Skip to content

Commit

Permalink
Merge branch 'master' into summaries-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbrinkerink committed Jan 7, 2025
2 parents 3f6e93c + 8503d50 commit 62a58a8
Show file tree
Hide file tree
Showing 10 changed files with 534 additions and 633 deletions.
1 change: 0 additions & 1 deletion resources/osemosys_fast_preprocessed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ s.t. OC3_OperatingCostsTotalAnnual{r in REGION, t in TECHNOLOGY, y in YEAR}: (((
#
#s.t. TDC1_TotalDiscountedCostByTechnology{r in REGION, t in TECHNOLOGY, y in YEAR}: ((((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y])*FixedCost[r,t,y] + sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y]*VariableCost[r,t,m,y])/DiscountFactorMid[r,y]+CapitalCost[r,t,y] * NewCapacity[r,t,y]/DiscountFactor[r,y]+DiscountedTechnologyEmissionsPenalty[r,t,y]-DiscountedSalvageValue[r,t,y]) = TotalDiscountedCostByTechnology[r,t,y];
#s.t. TDC2_TotalDiscountedCost{r in REGION, y in YEAR}: sum{t in TECHNOLOGY}((((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y])*FixedCost[r,t,y] + sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y]*VariableCost[r,t,m,y])/DiscountFactorMid[r,y]+CapitalCost[r,t,y] * NewCapacity[r,t,y]/DiscountFactor[r,y]+DiscountedTechnologyEmissionsPenalty[r,t,y]-DiscountedSalvageValue[r,t,y]) + sum{s in STORAGE} (CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/DiscountFactor[r,y]-CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/DiscountFactor[r,y]) = TotalDiscountedCost[r,y];
s.t. TDC2_TotalDiscountedCost{r in REGION, y in YEAR}: sum{t in TECHNOLOGY}(OperatingCost[r,t,y] + CapitalInvestment[r,t,y] + AnnualTechnologyEmissionsPenalty[r,t,y]) + sum{s in STORAGE} (CapitalInvestmentStorage[r,s,y]) = TotalDiscountedCost[r,y];
#
######### Total Capacity Constraints ##############
#
Expand Down
42 changes: 25 additions & 17 deletions workflow/rules/preprocess.smk
Original file line number Diff line number Diff line change
Expand Up @@ -287,30 +287,38 @@ rule timeslice:
message:
'Generating timeslice data...'
input:
'resources/data/All_Demand_UTC_2015.csv',
'resources/data/CSP 2015.csv',
'resources/data/SolarPV 2015.csv',
'resources/data/Hydro_Monthly_Profiles (15 year average).csv',
'resources/data/Won 2015.csv',
'resources/data/Woff 2015.csv',
'resources/data/custom_nodes/specified_demand_profile.csv',
'resources/data/custom_nodes/RE_profiles_CSP.csv',
'resources/data/custom_nodes/RE_profiles_HYD.csv',
'resources/data/custom_nodes/RE_profiles_SPV.csv',
'resources/data/custom_nodes/RE_profiles_WOF.csv',
'resources/data/custom_nodes/RE_profiles_WON.csv',
plexos_demand = 'resources/data/All_Demand_UTC_2015.csv',
plexos_csp_2015 = 'resources/data/CSP 2015.csv',
plexos_spv_2015 = 'resources/data/SolarPV 2015.csv',
plexos_hyd_2015 = 'resources/data/Hydro_Monthly_Profiles (15 year average).csv',
plexos_won_2015 = 'resources/data/Won 2015.csv',
plexos_wof_2015 = 'resources/data/Woff 2015.csv',
custom_specified_demand_profiles = 'resources/data/custom_nodes/specified_demand_profile.csv',
custom_csp_profiles = 'resources/data/custom_nodes/RE_profiles_CSP.csv',
custom_hyd_profiles = 'resources/data/custom_nodes/RE_profiles_HYD.csv',
custom_spv_profiles = 'resources/data/custom_nodes/RE_profiles_SPV.csv',
custom_wof_profiles = 'resources/data/custom_nodes/RE_profiles_WOF.csv',
custom_won_profiles = 'resources/data/custom_nodes/RE_profiles_WON.csv',
params:
start_year = config['startYear'],
end_year = config['endYear'],
daytype = config['daytype'],
daypart = config['dayparts'],
region_name = 'GLOBAL',
output_data_dir = 'results/data',
input_data_dir = 'resources/data',
input_dir = 'resources',
output_dir = 'results',
custom_nodes_dir = 'resources/data/custom_nodes',
geographic_scope = config['geographic_scope'],
seasons = config['seasons'],
dayparts = config['dayparts'],
daytype = config['daytype'],
timeshift = config['timeshift'],
output:
csv_files = expand('results/data/{output_file}.csv', output_file=timeslice_files),
log:
log = 'results/logs/timeslice.log'
shell:
'python workflow/scripts/osemosys_global/TS_data.py 2> {log}'
script:
"../scripts/osemosys_global/TS_data.py"

rule reserves:
message:
Expand Down Expand Up @@ -383,4 +391,4 @@ rule create_missing_csv:
output:
csvs = expand("results/data/{empty}.csv", empty=EMPTY_CSVS)
script:
"../scripts/osemosys_global/create_missing_csvs.py"
"../scripts/osemosys_global/create_missing_csvs.py"
3 changes: 2 additions & 1 deletion workflow/rules/retrieve.smk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ rule download_external_files:
message:
"Downloading external files..."
params:
files = get_external_links()
files = get_external_links(),
input_data_dir = 'resources/data'
log:
log = "results/logs/external_files.log"
output:
Expand Down
Loading

0 comments on commit 62a58a8

Please sign in to comment.