Skip to content

Commit

Permalink
Merge pull request #1155 from NREL-Sienna/gks/more_system_conversions
Browse files Browse the repository at this point in the history
Yet more PSY3 to PSY4 system conversions
  • Loading branch information
jd-lara authored Jul 17, 2024
2 parents 32e024a + c21ec16 commit 16b3ffd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/data_format_conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ _convert_op_cost(::Val{:GenericBattery}, ::Val{:StorageManagementCost}, op_cost:
energy_surplus_cost = op_cost["energy_surplus_cost"],
)

_convert_op_cost(::Val{:HydroPumpedStorage}, ::Val{:TwoPartCost}, op_cost::Dict) =
HydroGenerationCost(CostCurve(InputOutputCurve(op_cost["variable"])), op_cost["fixed"])

_convert_op_cost(::Val{:HydroDispatch}, ::Val{:TwoPartCost}, op_cost::Dict) =
HydroGenerationCost(CostCurve(InputOutputCurve(op_cost["variable"])), op_cost["fixed"])

# TODO implement remaining _convert_op_cost methods

function _convert_data!(
Expand All @@ -123,6 +129,10 @@ function _convert_data!(
new_op_cost = IS.serialize(_convert_op_cost(comp_type, op_cost_type, op_cost))
component["operation_cost"] = new_op_cost
end

(component["__metadata__"]["type"] == "RenewableFix") &&
(component["__metadata__"]["type"] = "RenewableNonDispatch")

if component["__metadata__"]["type"] ["BatteryEMS", "GenericBattery"]
old_type = component["__metadata__"]["type"]
component["__metadata__"]["type"] = "EnergyReservoirStorage"
Expand Down

0 comments on commit 16b3ffd

Please sign in to comment.