Adding an Operating Cost
This how-to guide covers the steps to select and add an operating cost to a component, such as a generator, load, or energy storage system.
To begin, the user must make 2 or 3 decisions before defining the operating cost:
Select an appropriate
OperationalCost
from theOperationalCost
options. In general, each operating cost has parameters to define fixed and variable costs. To be able to define anOperationalCost
, you must first select a curve to represent the variable cost(s).- If you selected
ThermalGenerationCost
orHydroGenerationCost
, select either aFuelCurve
orCostCurve
to represent the variable cost, based on the units of the generator's data.
- If you selected
Select a
ValueCurve
to represent the variable cost data by comparing the format of your variable cost data to the Variable Cost Representations table and theValueCurve
options.
Then, the user defines the cost by working backwards:
- Define the variable cost's
ValueCurve
- Use the
ValueCurve
to define the selectedCostCurve
orFuelCurve
- Use the
CostCurve
orFuelCurve
to define theOperationalCost
Let's look at a few examples.
Example 1: A Renewable Generator
We have a renewable unit that produces at $22/MWh.
Following the decision steps above:
- We select
RenewableGenerationCost
to represent this renewable generator. - We select a
LinearCurve
to represent the $22/MWh variable cost.
Following the implementation steps, we define RenewableGenerationCost
by nesting the definitions:
julia> RenewableGenerationCost(; variable = CostCurve(; value_curve = LinearCurve(22.0)))
RenewableGenerationCost: variable: CostCurve: value_curve: LinearCurve (a type of InputOutputCurve) where function is: f(x) = 22.0 x + 0.0 power_units: UnitSystem.NATURAL_UNITS = 2 vom_cost: LinearCurve (a type of InputOutputCurve) where function is: f(x) = 0.0 x + 0.0 curtailment_cost: CostCurve: value_curve: LinearCurve (a type of InputOutputCurve) where function is: f(x) = 0.0 x + 0.0 power_units: UnitSystem.NATURAL_UNITS = 2 vom_cost: LinearCurve (a type of InputOutputCurve) where function is: f(x) = 0.0 x + 0.0
Example 2: A Thermal Generator
We have a thermal generating unit that has a heat rate of 7 GJ/MWh at 100 MW and 9 GJ/MWh at 200 MW, plus a fixed cost of $6.0/hr, a start-up cost of $2000, and a shut-down cost of $1000. Its fuel cost is $20/GJ.
Following the decision steps above:
- We select
ThermalGenerationCost
to represent this thermal generator. - We select
FuelCurve
because we have consumption in units of fuel (GJ/MWh) instead of currency. - We select a
PiecewisePointCurve
to represent the piecewise linear heat rate curve.
This time, we'll define each step individually, beginning with the heat rate curve:
julia> heat_rate_curve = PiecewisePointCurve([(100.0, 7.0), (200.0, 9.0)])
PiecewisePointCurve (a type of InputOutputCurve) where function is: piecewise linear y = f(x) connecting points: (x = 100.0, y = 7.0) (x = 200.0, y = 9.0)
Use the heat rate to define the fuel curve, including the cost of fuel:
julia> fuel_curve = FuelCurve(; value_curve = heat_rate_curve, fuel_cost = 20.0)
FuelCurve: value_curve: PiecewisePointCurve (a type of InputOutputCurve) where function is: piecewise linear y = f(x) connecting points: (x = 100.0, y = 7.0) (x = 200.0, y = 9.0) power_units: UnitSystem.NATURAL_UNITS = 2 fuel_cost: 20.0 vom_cost: LinearCurve (a type of InputOutputCurve) where function is: f(x) = 0.0 x + 0.0
Finally, define the full operating cost:
julia> cost = ThermalGenerationCost(; variable = fuel_curve, fixed = 6.0, start_up = 2000.0, shut_down = 1000.0, )
ThermalGenerationCost: variable: FuelCurve: value_curve: PiecewisePointCurve (a type of InputOutputCurve) where function is: piecewise linear y = f(x) connecting points: (x = 100.0, y = 7.0) (x = 200.0, y = 9.0) power_units: UnitSystem.NATURAL_UNITS = 2 fuel_cost: 20.0 vom_cost: LinearCurve (a type of InputOutputCurve) where function is: f(x) = 0.0 x + 0.0 fixed: 6.0 start_up: 2000.0 shut_down: 1000.0
This OperationalCost
can be used when defining a component or added to an existing component using set_operation_cost!
.