diff --git a/src/devices_models/devices/common/objective_function/linear_curve.jl b/src/devices_models/devices/common/objective_function/linear_curve.jl index 7d76ecdb0..91e2a9eed 100644 --- a/src/devices_models/devices/common/objective_function/linear_curve.jl +++ b/src/devices_models/devices/common/objective_function/linear_curve.jl @@ -116,24 +116,10 @@ function _add_fuel_linear_variable_cost!( container::OptimizationContainer, ::T, component::V, - heat_rate::Float64, # already normalized in MMBTU/p.u. + ::Float64, # already normalized in MMBTU/p.u. fuel_cost::IS.TimeSeriesKey, ) where {T <: VariableType, V <: PSY.Component} - parameter = get_parameter_array(container, FuelCostParameter(), V) - multiplier = get_parameter_multiplier_array(container, FuelCostParameter(), V) - expression = get_expression(container, FuelConsumptionExpression(), V) - name = PSY.get_name(component) - for t in get_time_steps(container) - cost_expr = expression[name, t] * parameter[name, t] * multiplier[name, t] - add_to_expression!( - container, - ProductionCostExpression, - cost_expr, - component, - t, - ) - add_to_objective_variant_expression!(container, cost_expr) - end + _add_time_varying_fuel_variable_cost!(container, T(), component, fuel_cost) return end diff --git a/src/devices_models/devices/common/objective_function/quadratic_curve.jl b/src/devices_models/devices/common/objective_function/quadratic_curve.jl index 686dc0d23..0bc31bbe5 100644 --- a/src/devices_models/devices/common/objective_function/quadratic_curve.jl +++ b/src/devices_models/devices/common/objective_function/quadratic_curve.jl @@ -212,14 +212,7 @@ function _add_fuel_quadratic_variable_cost!( quadratic_fuel_curve::Float64, fuel_cost::IS.TimeSeriesKey, ) where {T <: VariableType} - error("Not implemented yet") - _add_quadraticcurve_variable_cost!( - container, - T(), - component, - proportional_fuel_curve, - quadratic_fuel_curve, - ) + _add_time_varying_fuel_variable_cost!(container, T(), component, fuel_cost) end @doc raw"""