-
Notifications
You must be signed in to change notification settings - Fork 27
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
Corrects TCT constraint #521
base: develop
Are you sure you want to change the base?
Conversation
@ktehranchi, as you did the original implementation of TCT, and I uncommented some of your code, could you do a quick review of this please? I just want to make sure I didnt change how you envisioned the TCT constraint. |
Added assertion that will flag if a max capacity limit is higher than existing installed capacity For example, this will print out:
|
n.model.add_constraints( | ||
lhs >= (target["min"]), | ||
name=f"GlobalConstraint-{target.name}_{target.planning_horizon}_min", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I have "GlobalConstraint" appended is to be able to get pypsa to export the shadow price of the constraint (PyPSA/PyPSA#850) . So it'd be good to add that back!
LGTM but added one comment on the naming of the constraint. |
Closes #520
Changes proposed in this Pull Request
In this PR I update the TCT constraint logic. Specifically, I have removed existing capacity from the rhs of the constraint equation, and left the summation over only extendable generators.
For example, if there is 10MW of existing solar capacity, and the target is at least 50MW, the constraint will read:
I think to improve interoperability between electricity and sector, it would be nice to not hard code in the
Generator
andStorageUnit
component filtering, but I will add that as a new issue.Checklist
envs/environment.yaml
.config.default.yaml
.doc/configtables/*.csv
.