Skip to content

Commit 97e6684

Browse files
authored
Merge pull request #1529 from NREL-Sienna/rh/remove_hydroenergyreservoir
[BREAKING] Remove HydroEnergyReservoir struct
2 parents bc14598 + 9a629f8 commit 97e6684

30 files changed

+617
-2333
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
2424
[compat]
2525
CSV = "~0.10"
2626
DataFrames = "1"
27-
DataStructures = "~0.18"
27+
DataStructures = "^0.19"
2828
Dates = "1"
2929
DocStringExtensions = "0.8, 0.9.2"
3030
InfrastructureSystems = "^2.6"
@@ -33,8 +33,8 @@ JSON3 = "1"
3333
LinearAlgebra = "1"
3434
Logging = "1"
3535
PowerFlowData = "^1.5"
36-
PrettyTables = "1, 2"
37-
TimeSeries = "0.24"
36+
PrettyTables = "2"
37+
TimeSeries = "0.25"
3838
UUIDs = "1"
3939
Unicode = "1"
4040
YAML = "~0.4"

src/PowerSystems.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export get_spillage_cost, set_spillage_cost!
101101
export Generator
102102
export HydroGen
103103
export HydroDispatch
104-
export HydroEnergyReservoir
105104
export HydroTurbine
106105
export HydroReservoir
107106
export HydroPumpTurbine
@@ -324,6 +323,7 @@ export StateTypes
324323
export ReservoirDataType
325324
export MotorLoadTechnology
326325
export HydroTurbineType
326+
export ReservoirLocation
327327

328328
# from IS time_series_structs.jl, time_series_cache.jl
329329
export TimeSeriesAssociation
@@ -375,6 +375,7 @@ export has_service
375375
export remove_reservoir!
376376
export clear_reservoirs!
377377
export get_reservoirs
378+
export get_reservoir_location
378379
export has_reservoir
379380
export has_time_series
380381
export get_buses
@@ -837,6 +838,7 @@ include("models/dynamic_branch.jl")
837838
include("impedance_correction.jl")
838839
include("models/supplemental_constructors.jl")
839840
include("models/supplemental_accessors.jl")
841+
include("models/supplemental_setters.jl")
840842

841843
# Supplemental attributes
842844
include("contingencies.jl")

src/base.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,6 +2682,9 @@ end
26822682
function handle_component_removal!(sys::System, service::Service)
26832683
_handle_component_removal_common!(service)
26842684
for device in get_components(Device, sys)
2685+
if !supports_services(device)
2686+
continue
2687+
end
26852688
_remove_service!(device, service)
26862689
end
26872690
end

src/definitions.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,22 @@ across different systems.
477477
- `OTHER` : Placeholder for less common or custom turbine designs.
478478
" HydroTurbineType
479479

480+
IS.@scoped_enum(
481+
ReservoirLocation,
482+
HEAD = 1,
483+
TAIL = 2,
484+
)
485+
@doc"
486+
ReservoirLocation
487+
488+
Enumeration representing the location of a hydro reservoir relative to its associated turbine.
489+
490+
# Values
491+
- `HEAD`: The reservoir is located upstream of the turbine, typically at a higher elevation.
492+
- `TAIL`: The reservoir is located downstream of the turbine at a lower or same elevation.
493+
494+
" ReservoirLocation
495+
480496
const PS_MAX_LOG = parse(Int, get(ENV, "PS_MAX_LOG", "50"))
481497
const DEFAULT_BASE_MVA = 100.0
482498

src/descriptors/power_system_inputs.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,6 @@
818818
"name": "generator_category",
819819
"value_options": [
820820
"HydroDispatch",
821-
"HydroEnergyReservoir",
822821
"RenewableNonDispatch",
823822
"RenewableDispatch",
824823
"ThermalStandard",

0 commit comments

Comments
 (0)