Skip to content

Commit

Permalink
Eliminate TwoPartCost in generated structs
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielKS committed Mar 21, 2024
1 parent 6ed554b commit ddd5d08
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 36 deletions.
28 changes: 14 additions & 14 deletions src/descriptors/power_system_structs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1302,9 +1302,9 @@
},
{
"name": "operation_cost",
"null_value": "TwoPartCost(nothing)",
"data_type": "TwoPartCost",
"comment": "Operation Cost of Generation [`TwoPartCost`](@ref)"
"null_value": "LoadCost(nothing)",
"data_type": "OperationalCost",
"comment": "Operation Cost of Generation [`OperationalCost`](@ref)"
},
{
"name": "services",
Expand Down Expand Up @@ -2594,9 +2594,9 @@
},
{
"name": "operation_cost",
"null_value": "TwoPartCost(nothing)",
"null_value": "LoadCost(nothing)",
"data_type": "OperationalCost",
"default": "TwoPartCost(LinearFunctionData(0.0), 0.0)",
"default": "LoadCost(nothing)",
"comment": "Operation Cost of Generation [`OperationalCost`](@ref)"
},
{
Expand Down Expand Up @@ -2949,9 +2949,9 @@
},
{
"name": "operation_cost",
"null_value": "TwoPartCost(nothing)",
"null_value": "HydroGenerationCost(nothing)",
"data_type": "OperationalCost",
"default": "TwoPartCost(LinearFunctionData(0.0), 0.0)",
"default": "HydroGenerationCost(nothing)",
"comment": "Operation Cost of Generation [`OperationalCost`](@ref)"
},
{
Expand Down Expand Up @@ -3124,9 +3124,9 @@
},
{
"name": "operation_cost",
"null_value": "TwoPartCost(nothing)",
"null_value": "HydroGenerationCost(nothing)",
"data_type": "OperationalCost",
"default": "TwoPartCost(LinearFunctionData(0.0), 0.0)",
"default": "HydroGenerationCost(nothing)",
"comment": "Operation Cost of Generation [`OperationalCost`](@ref)"
},
{
Expand Down Expand Up @@ -3379,9 +3379,9 @@
},
{
"name": "operation_cost",
"null_value": "TwoPartCost(nothing)",
"null_value": "HydroGenerationCost(nothing)",
"data_type": "OperationalCost",
"default": "TwoPartCost(LinearFunctionData(0.0), 0.0)",
"default": "HydroGenerationCost(nothing)",
"comment": "Operation Cost of Generation [`OperationalCost`](@ref)"
},
{
Expand Down Expand Up @@ -3521,9 +3521,9 @@
},
{
"name": "operation_cost",
"null_value": "TwoPartCost(nothing)",
"data_type": "TwoPartCost",
"comment": "Operation Cost of Generation [`TwoPartCost`](@ref)"
"null_value": "RenewablePowerCost(nothing)",
"data_type": "OperationalCost",
"comment": "Operation Cost of Generation [`OperationalCost`](@ref)"
},
{
"name": "base_power",
Expand Down
6 changes: 3 additions & 3 deletions src/models/generated/HydroDispatch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ mutable struct HydroDispatch <: HydroGen
internal::InfrastructureSystemsInternal
end

function HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
function HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=HydroGenerationCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), )
end

function HydroDispatch(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
function HydroDispatch(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost=HydroGenerationCost(nothing), services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
HydroDispatch(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, operation_cost, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, )
end

Expand All @@ -106,7 +106,7 @@ function HydroDispatch(::Nothing)
ramp_limits=nothing,
time_limits=nothing,
base_power=0.0,
operation_cost=TwoPartCost(nothing),
operation_cost=HydroGenerationCost(nothing),
services=Device[],
dynamic_injector=nothing,
ext=Dict{String, Any}(),
Expand Down
6 changes: 3 additions & 3 deletions src/models/generated/HydroEnergyReservoir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ mutable struct HydroEnergyReservoir <: HydroGen
internal::InfrastructureSystemsInternal
end

function HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
function HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=HydroGenerationCost(nothing), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost, storage_target, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), )
end

function HydroEnergyReservoir(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
function HydroEnergyReservoir(; name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost=HydroGenerationCost(nothing), storage_target=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
HydroEnergyReservoir(name, available, bus, active_power, reactive_power, rating, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, base_power, storage_capacity, inflow, initial_storage, operation_cost, storage_target, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, )
end

Expand All @@ -132,7 +132,7 @@ function HydroEnergyReservoir(::Nothing)
storage_capacity=0.0,
inflow=0.0,
initial_storage=0.0,
operation_cost=TwoPartCost(nothing),
operation_cost=HydroGenerationCost(nothing),
storage_target=0.0,
conversion_factor=0.0,
time_at_status=INFINITE_TIME,
Expand Down
6 changes: 3 additions & 3 deletions src/models/generated/HydroPumpedStorage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ mutable struct HydroPumpedStorage <: HydroGen
internal::InfrastructureSystemsInternal
end

function HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
function HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=HydroGenerationCost(nothing), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target, operation_cost, pump_efficiency, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), )
end

function HydroPumpedStorage(; name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
function HydroPumpedStorage(; name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target=(up=1.0, down=1.0), operation_cost=HydroGenerationCost(nothing), pump_efficiency=1.0, conversion_factor=1.0, time_at_status=INFINITE_TIME, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
HydroPumpedStorage(name, available, bus, active_power, reactive_power, rating, base_power, prime_mover_type, active_power_limits, reactive_power_limits, ramp_limits, time_limits, rating_pump, active_power_limits_pump, reactive_power_limits_pump, ramp_limits_pump, time_limits_pump, storage_capacity, inflow, outflow, initial_storage, storage_target, operation_cost, pump_efficiency, conversion_factor, time_at_status, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, )
end

Expand Down Expand Up @@ -165,7 +165,7 @@ function HydroPumpedStorage(::Nothing)
outflow=0.0,
initial_storage=(up=0.0, down=0.0),
storage_target=(up=0.0, down=0.0),
operation_cost=TwoPartCost(nothing),
operation_cost=HydroGenerationCost(nothing),
pump_efficiency=0.0,
conversion_factor=0.0,
time_at_status=INFINITE_TIME,
Expand Down
6 changes: 3 additions & 3 deletions src/models/generated/InterconnectingConverter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ mutable struct InterconnectingConverter <: StaticInjection
internal::InfrastructureSystemsInternal
end

function InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
function InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, operation_cost=LoadCost(nothing), efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), )
InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, operation_cost, efficiency, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, InfrastructureSystemsInternal(), )
end

function InterconnectingConverter(; name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, operation_cost=TwoPartCost(LinearFunctionData(0.0), 0.0), efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
function InterconnectingConverter(; name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, operation_cost=LoadCost(nothing), efficiency=1.0, services=Device[], dynamic_injector=nothing, ext=Dict{String, Any}(), time_series_container=InfrastructureSystems.TimeSeriesContainer(), supplemental_attributes_container=InfrastructureSystems.SupplementalAttributesContainer(), internal=InfrastructureSystemsInternal(), )
InterconnectingConverter(name, available, bus, dc_bus, active_power, rating, active_power_limits, base_power, operation_cost, efficiency, services, dynamic_injector, ext, time_series_container, supplemental_attributes_container, internal, )
end

Expand All @@ -92,7 +92,7 @@ function InterconnectingConverter(::Nothing)
rating=0.0,
active_power_limits=(min=0.0, max=0.0),
base_power=0.0,
operation_cost=TwoPartCost(nothing),
operation_cost=LoadCost(nothing),
efficiency=0.0,
services=Device[],
dynamic_injector=nothing,
Expand Down
10 changes: 5 additions & 5 deletions src/models/generated/InterruptiblePowerLoad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This file is auto-generated. Do not edit.
max_active_power::Float64
max_reactive_power::Float64
base_power::Float64
operation_cost::TwoPartCost
operation_cost::OperationalCost
services::Vector{Service}
dynamic_injector::Union{Nothing, DynamicInjection}
ext::Dict{String, Any}
Expand All @@ -34,7 +34,7 @@ This file is auto-generated. Do not edit.
- `max_active_power::Float64`
- `max_reactive_power::Float64`
- `base_power::Float64`: Base power of the unit in MVA, validation range: `(0, nothing)`, action if invalid: `warn`
- `operation_cost::TwoPartCost`: Operation Cost of Generation [`TwoPartCost`](@ref)
- `operation_cost::OperationalCost`: Operation Cost of Generation [`OperationalCost`](@ref)
- `services::Vector{Service}`: Services that this device contributes to
- `dynamic_injector::Union{Nothing, DynamicInjection}`: corresponding dynamic injection device
- `ext::Dict{String, Any}`
Expand All @@ -52,8 +52,8 @@ mutable struct InterruptiblePowerLoad <: ControllableLoad
max_reactive_power::Float64
"Base power of the unit in MVA"
base_power::Float64
"Operation Cost of Generation [`TwoPartCost`](@ref)"
operation_cost::TwoPartCost
"Operation Cost of Generation [`OperationalCost`](@ref)"
operation_cost::OperationalCost
"Services that this device contributes to"
services::Vector{Service}
"corresponding dynamic injection device"
Expand Down Expand Up @@ -86,7 +86,7 @@ function InterruptiblePowerLoad(::Nothing)
max_active_power=0.0,
max_reactive_power=0.0,
base_power=0.0,
operation_cost=TwoPartCost(nothing),
operation_cost=LoadCost(nothing),
services=Device[],
dynamic_injector=nothing,
ext=Dict{String, Any}(),
Expand Down
Loading

0 comments on commit ddd5d08

Please sign in to comment.