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 #567: apply min/max power for electrolyzers #583

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/model/resources/hydrogen/electrolyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,16 @@
end)

### Minimum and maximum power output constraints (Constraints #3-4)
if setup["Reserves"] == 1
## Electrolyzers currently do not contribute to operating reserves. Could allow them to contribute as a curtailable demand in future.
else
@constraints(EP, begin
# Minimum stable power generated per technology "y" at hour "t" Min_Power
[y in ELECTROLYZERS, t in 1:T], EP[:vUSE][y,t] >= dfGen[y,:Min_Power]*EP[:eTotalCap][y]

# Maximum power generated per technology "y" at hour "t"
[y in ELECTROLYZERS, t in 1:T], EP[:vUSE][y,t] <= inputs["pP_Max"][y,t]*EP[:eTotalCap][y]
end)

end
# Electrolyzers currently do not contribute to operating reserves, so there is not
# special case (for Reserves == 1) here.
# Could allow them to contribute as a curtailable demand in future.
@constraints(EP, begin

Check warning on line 128 in src/model/resources/hydrogen/electrolyzer.jl

View check run for this annotation

Codecov / codecov/patch

src/model/resources/hydrogen/electrolyzer.jl#L128

Added line #L128 was not covered by tests
# Minimum stable power generated per technology "y" at hour "t" Min_Power
[y in ELECTROLYZERS, t in 1:T], EP[:vUSE][y,t] >= dfGen[y,:Min_Power]*EP[:eTotalCap][y]

# Maximum power generated per technology "y" at hour "t"
[y in ELECTROLYZERS, t in 1:T], EP[:vUSE][y,t] <= inputs["pP_Max"][y,t]*EP[:eTotalCap][y]
end)

### Minimum hydrogen production constraint (if any) (Constraint #5)
kt_to_t = 10^3
Expand Down