Skip to content

Commit

Permalink
Merge pull request #1097 from NREL-Sienna/gks/costs_2_cleanup_2
Browse files Browse the repository at this point in the history
More Miscellaneous Costs Cleanup
  • Loading branch information
jd-lara authored May 2, 2024
2 parents 9318161 + 571bd86 commit f805903
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/PowerSystems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ import InfrastructureSystems:
get_points, # TODO possible rename to disambiguate from geographical information
get_x_coords,
get_y_coords,
get_raw_data,
get_raw_data_type,
supports_time_series,
supports_supplemental_attributes
Expand Down
10 changes: 6 additions & 4 deletions src/models/cost_functions/HydroGenerationCost.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
mutable struct HydroGenerationCost <: OperationalCost
variable::FuelCurve
variable::ProductionVariableCost
fixed::Float64
end
Expand All @@ -10,8 +10,10 @@ values are used or the opportunity cost of water if the costs are positive. It a
fuel curves to model specific water intake.
# Arguments
- `variable::FuelCurve`: Production variable cost represented by a fuel curve, where the fuel is water.
- `fixed::Union{Nothing, Float64}`: Fixed cost of keeping the unit online. For some cost represenations this field can be duplicative.
- `variable::ProductionVariableCost`: Production variable cost represented by a `FuelCurve`,
where the fuel is water, or a `CostCurve` in currency.
- `fixed::Union{Nothing, Float64}`: Fixed cost of keeping the unit online. For some cost
represenations this field can be duplicative.
"""
@kwdef mutable struct HydroGenerationCost <: OperationalCost
"variable cost"
Expand All @@ -21,7 +23,7 @@ fuel curves to model specific water intake.
end

# Constructor for demo purposes; non-functional.
HydroGenerationCost(::Nothing) = HydroGenerationCost(zero(FuelCurve), 0.0)
HydroGenerationCost(::Nothing) = HydroGenerationCost(zero(CostCurve), 0.0)

"""Get [`HydroGenerationCost`](@ref) `variable`."""
get_variable(value::HydroGenerationCost) = value.variable
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/power_models_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ end

function make_hydro_gen(gen_name, d, bus, sys_mbase)
ramp_agc = get(d, "ramp_agc", get(d, "ramp_10", get(d, "ramp_30", abs(d["pmax"]))))
curtailcost = HydroGenerationCost(zero(FuelCurve), 0.0)
curtailcost = HydroGenerationCost(zero(CostCurve), 0.0)

base_conversion = sys_mbase / d["mbase"]
return HydroDispatch(; # No way to define storage parameters for gens in PM so can only make HydroDispatch
Expand Down

0 comments on commit f805903

Please sign in to comment.