Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug that lead to infeasible electricity demand #20

Merged
merged 5 commits into from
Jun 24, 2024
Merged

Conversation

samgdotson
Copy link
Member

This PR addresses an issue that caused the model to have an electricity demand 4x higher than the historical demand.

  1. If the model was not allowed to build new capacity, it became infeasible (i.e., no solution).
  2. During temporal aggregation, the demand timeseries were aggregated using demand.resample('4h').sum() (see the attach_load function in add_electricity.py).
  3. I switched the .sum() for .mean() which resolved the issue. Illinois can now meet all of its electricity demand with existing resources.

Additionally, this PR updates the gitignore file, removes jupyter notebooks, and removes data files that are produced as part of the snakemake workflow.

Dispatch sample

Below is a figure showing generator dispatch for the month of July as a sanity check. Resources are deployed according to their marginal costs, and available renewables are always deployed.

illinois_dispatch

@samgdotson samgdotson added Type:Bug Something is wrong or broken. This issue or PR is related to a bug in code. Comp:Analysis This issue has to do with the analysis component of the code or document. (plots, postprocessing) Comp:Input This issue has to do with the input component of the code or document. (input parameters, prep) Difficulty:1-Beginner This issue does not require expert knowledge and may be a good issue for new contributors. Priority:1-Critical This is the highest priority (i.e. it is blocking other work or facing a deadline). Status:5-In Review This issue has been handled, and the solution is being reviewed. (probably as a PR) labels Jun 21, 2024
@samgdotson samgdotson requested a review from lshaver June 21, 2024 22:08
@samgdotson samgdotson self-assigned this Jun 21, 2024
Copy link
Contributor

@lshaver lshaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, appreciate getting everything cleaned up.

@lshaver lshaver merged commit c5e8bc2 into main Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp:Analysis This issue has to do with the analysis component of the code or document. (plots, postprocessing) Comp:Input This issue has to do with the input component of the code or document. (input parameters, prep) Difficulty:1-Beginner This issue does not require expert knowledge and may be a good issue for new contributors. Priority:1-Critical This is the highest priority (i.e. it is blocking other work or facing a deadline). Status:5-In Review This issue has been handled, and the solution is being reviewed. (probably as a PR) Type:Bug Something is wrong or broken. This issue or PR is related to a bug in code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants