Skip to content

Commit dcbbc16

Browse files
authored
Merge pull request #123 from REAM-lab/ms/ldes-paper
Add more plots for Martin's LDES paper
2 parents 25e3023 + bd646ed commit dcbbc16

24 files changed

+1349
-410
lines changed

papers/Martin_Staadecker_Value_of_LDES_and_Factors/LDES_paper_graphs/Figure LDES cycles.py

Lines changed: 0 additions & 202 deletions
This file was deleted.

papers/Martin_Staadecker_Value_of_LDES_and_Factors/LDES_paper_graphs/Reference Load Zone Names.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

papers/Martin_Staadecker_Value_of_LDES_and_Factors/LDES_paper_graphs/util.py

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
from papers.Martin_Staadecker_et_al_2022.util import get_scenario
2+
from switch_model.tools.graph.main import GraphTools
3+
4+
tools = GraphTools(scenarios=[
5+
get_scenario("1342", "1342"),
6+
get_scenario("base", "base")
7+
])
8+
tools.pre_graphing(multi_scenario=True)
9+
10+
projects = tools.get_dataframe("generation_projects_info.csv", from_inputs=True, convert_dot_to_na=True)
11+
costs = tools.get_dataframe("gen_build_costs.csv", from_inputs=True, convert_dot_to_na=True)
12+
predetermined = tools.get_dataframe("gen_build_predetermined", from_inputs=True, convert_dot_to_na=True)
13+
14+
projects = projects.merge(
15+
costs,
16+
on=["GENERATION_PROJECT", "scenario_name", "scenario_index"],
17+
)
18+
19+
projects = projects.merge(
20+
predetermined,
21+
on=["GENERATION_PROJECT", "build_year", "scenario_name", "scenario_index"],
22+
how="left" # Makes a left join
23+
)
24+
25+
prebuilt = projects[(projects.build_year != 2050) & (projects.scenario_name == "1342")]
26+
print("prebuilt total :", len(prebuilt))
27+
prebuilt = prebuilt[(prebuilt.build_year + prebuilt.gen_max_age) > 2051]
28+
print("prebuilt alive :", len(prebuilt))
29+
30+
print("prebuild by tech")
31+
prebuilt_by_tech = prebuilt.groupby(["gen_energy_source", "gen_tech"]).GENERATION_PROJECT.count()
32+
print(prebuilt_by_tech)
33+
34+
prebuilt_by_tech = prebuilt.groupby(["gen_energy_source", "gen_tech"]).gen_capacity_limit_mw.sum() / 1000
35+
print("prebuilt by tech capacity")
36+
print(prebuilt_by_tech.sort_values(ascending=False))
37+
print(prebuilt_by_tech.sum())
38+
39+
candidate = projects[(projects.build_year == 2050) & (projects.scenario_name == "base")]
40+
print("candidate projects (50 extra than actual because storage gets overwritten): ", len(candidate))
41+
candidate_by_tech = candidate.groupby(["gen_energy_source", "gen_tech"]).GENERATION_PROJECT.count()
42+
print(candidate_by_tech)
43+
44+
candidate = projects[(projects.build_year == 2050) & (projects.scenario_name == "1342")]
45+
print("candidate projects aggregated: ", len(candidate))
46+
candidate_by_tech = candidate.groupby(["gen_energy_source"]).gen_capacity_limit_mw.sum() / 1000
47+
print(candidate_by_tech)
48+
49+
tools = GraphTools(scenarios=[get_scenario("WS043")])
50+
tx = tools.get_dataframe("transmission.csv", convert_dot_to_na=True)
51+
tx = tx[["BuildTx", "trans_length_km"]]
52+
tx_new = (tx.BuildTx * tx.trans_length_km).sum() * 1e-6
53+
print("Million MW-km tx deployed: ", tx_new)

0 commit comments

Comments
 (0)