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

Support predetermined builds after period start #137

Open
staadecker opened this issue Mar 11, 2021 · 0 comments
Open

Support predetermined builds after period start #137

staadecker opened this issue Mar 11, 2021 · 0 comments

Comments

@staadecker
Copy link

Hello there!

I'm opening this issue so that we don't forget about something we recently discovered in the Switch code. We don't have time to fix it right now, however I'd like to keep track of it.

Currently if we have a period named 2020 and we have generation being pre-built in the year 2020, the following code behaves unexpectedly.

def gen_build_can_operate_in_period(m, g, build_year, period):
if build_year in m.PERIODS:
online = m.period_start[build_year]
else:
online = build_year

When this function is called for generation being pre-built in the year 2020, build_year in m.PERIODS is true despite the project not being a period build. This means the project will retire sooner than normal (i.e. generation pre-built in 2020 will retire before generation pre-built in 2019).

I don't think there's an easy fix to the problem as currently gen_build_costs.csv doesn't differentiate between pre-built generation and investment builds so there's no way to differentiate between the two. The best course of action is likely to display a warning/error if pre-build years conflict with a period label.

I wonder if the switch code wasn't designed to have pre-build years after a period starts.

Thank you!

Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant