Skip to content

Commit

Permalink
optimizes a single year
Browse files Browse the repository at this point in the history
  • Loading branch information
samgdotson committed Sep 5, 2024
1 parent e545790 commit e5118ab
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
20 changes: 10 additions & 10 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
state_abbr: 'IL'
version: "9.0"
scenario: "export_and_growth_0pct"
version: "10.0"
scenario: "test_single_year"

solver: 'cplex' # 'cplex','highs','gurobi'
geo_res: 'rto' # accepts: 'rto' or 'county'
time_res: 4 # hours
load_filter: 60e3 # MW, load above this level will be removed as outliers.
# total_demand: 185e6 # Annual MWh in the first year
total_demand: 136e6 # Annual MWh in the first year
total_demand: 185e6 # Annual MWh in the first year
# total_demand: 136e6 # Annual MWh in the first year
load_growth: 0.00 # % annual growth
random_seed: 1234

model_years: [2025, 2030, 2035, 2040, 2045]
# model_years: [2025]
# model_years: [2025, 2030, 2035, 2040, 2045]
model_years: [2025]
plot_year: 2025

co2_limits:
Expand Down Expand Up @@ -48,10 +48,10 @@ capacity_max:
# 2025: 114
2025: 18

solar_years: [2016,2017,2018,2019,2020] # NSRDB only accepts years 1998-2020
wind_years: [2009,2010,2011,2012,2013] # WTK only goes from 2009-2013
# solar_years: [2016] # NSRDB only accepts years 1998-2020
# wind_years: [2009] # WTK only goes from 2009-2013
# solar_years: [2016,2017,2018,2019,2020] # NSRDB only accepts years 1998-2020
# wind_years: [2009,2010,2011,2012,2013] # WTK only goes from 2009-2013
solar_years: [2017] # NSRDB only accepts years 1998-2020
wind_years: [2009] # WTK only goes from 2009-2013
load_year: 2019
fuel_cost_year: 2023

Expand Down
Binary file modified dag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scripts/add_electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def add_capacity_max(n):


# add energy constraints
add_retirements(n)
# add_retirements(n)

# add capacity constraints
add_capacity_max(n)
Expand Down
22 changes: 14 additions & 8 deletions scripts/plot_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,22 @@ def plot_monthly_generation(n, time_res, model_years):

color = p_by_carrier.columns.map(n.carriers.color)

fig, ax = plt.subplots(1,len(model_years), figsize=(16, 8), sharey=True)
for i, year in enumerate(model_years):
p_by_carrier.loc[str(year)].plot.area(ax=ax[i],
if len(model_years) > 1:
fig, ax = plt.subplots(1,len(model_years), figsize=(16, 8), sharey=True)
for i, year in enumerate(model_years):
p_by_carrier.loc[str(year)].plot.area(ax=ax[i],
color=color,
fontsize=16, )

ax[i].set_xlabel('')

plt.tight_layout()
plt.subplots_adjust(wspace=0, hspace=0)
else:
fig, ax = plt.subplots(figsize=(12,8))
p_by_carrier.plot.area(ax=ax,
color=color,
fontsize=16, )

ax[i].set_xlabel('')

plt.tight_layout()
plt.subplots_adjust(wspace=0, hspace=0)
return fig, ax


Expand Down

0 comments on commit e5118ab

Please sign in to comment.