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

MultiStart with nothing #1036

Merged
merged 6 commits into from
Jan 8, 2024
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
19 changes: 15 additions & 4 deletions src/devices_models/devices/thermal_generation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,21 @@
Startup and shutdown active power limits for Compact Unit Commitment
"""
function get_startup_shutdown_limits(
device,
device::PSY.ThermalMultiStart,
::Type{ActivePowerVariableLimitsConstraint},
::Type{<:ThermalMultiStartUnitCommitment},
::Type{ThermalMultiStartUnitCommitment},
)
return PSY.get_power_trajectory(device)
startup_shutdown = PSY.get_power_trajectory(device)
if isnothing(startup_shutdown)
@warn(

Check warning on line 350 in src/devices_models/devices/thermal_generation.jl

View check run for this annotation

Codecov / codecov/patch

src/devices_models/devices/thermal_generation.jl#L350

Added line #L350 was not covered by tests
"Generator $(summary(device)) has a Nothing startup_shutdown property. Using active power limits."
)
return (

Check warning on line 353 in src/devices_models/devices/thermal_generation.jl

View check run for this annotation

Codecov / codecov/patch

src/devices_models/devices/thermal_generation.jl#L353

Added line #L353 was not covered by tests
startup = PSY.get_active_power_limits(device).max,
shutdown = PSY.get_active_power_limits(device).max,
)
end
return startup_shutdown
end

"""
Expand All @@ -355,7 +365,7 @@
device,
::Type{ActivePowerVariableLimitsConstraint},
::Type{<:AbstractCompactUnitCommitment},
) # -> Union{Nothing, NamedTuple{(:startup, :shutdown), Tuple{Float64, Float64}}}
) # -> Union{Nothing, NamedTuple{(:min, :max), Tuple{Float64, Float64}}}
return (
min = 0,
max = PSY.get_active_power_limits(device).max -
Expand Down Expand Up @@ -562,6 +572,7 @@
name = PSY.get_name(device)
limits = get_min_max_limits(device, T, W) # depends on constraint type and formulation type
startup_shutdown_limits = get_startup_shutdown_limits(device, T, W)
@assert !isnothing(startup_shutdown_limits) "$(name)"
if JuMP.has_lower_bound(varp[name, t])
JuMP.set_lower_bound(varp[name, t], 0.0)
end
Expand Down
Loading