Skip to content

Commit 25a28e4

Browse files
pesapstaadecker
authored andcommitted
Include filter for reserve capabilitY
1 parent fe41025 commit 25a28e4

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
""" This post-process selects which technologies can provide reserves"""
2+
# Standard packages
3+
import os
4+
import shutil
5+
6+
# Third-party packages
7+
import pandas as pd
8+
9+
from switch_model.wecc.get_inputs.register_post_process import register_post_process
10+
11+
12+
@register_post_process(
13+
name="no_fosill_reserve",
14+
msg="Aggregating candidate projects by load zone for specified technologies",
15+
only_with_config=True,
16+
priority=4
17+
)
18+
def post_process(config):
19+
""" This function sets to zero the column that allows each candidate technology to
20+
proividee"""
21+
22+
fname = "generation_projects_info.csv"
23+
df = pd.read_csv(fname)
24+
25+
# Energy sources to exclude from reserves
26+
filter_techs = ["ResidualFuelOil", "Gas", "DistillateFuelOil", "Coal"]
27+
28+
# Set to zero column that allows technology to provide reserves
29+
df.loc[
30+
df["gen_energy_source"].isin(filter_techs), "gen_can_provide_cap_reserves"
31+
] = 0
32+
33+
# Save file again
34+
df.to_csv(fname, index=False)

0 commit comments

Comments
 (0)