Objective Function#
The core purpose of the optimization model is to minimize the total system cost over a specified time horizon. This is achieved through an objective function that aggregates all relevant operational expenditures, as well as penalties for undesirable outcomes like unmet demand.
The main objective function is defined by the Pyomo constraint «eTotalSCost», which minimizes the variable «vTotalSCost» (\(\alpha\)).
Total System Cost#
The total system cost is the sum of all discounted costs across every period (\(\periodindex\)) and scenario (\(\scenarioindex\)) in the model horizon. The objective function can be expressed conceptually as:
Total system cost («eTotalSCost»)
And the total cost is the sum of all operational costs, discounted to present value («eTotalTCost»):
where:
\(C_{\periodindex,\scenarioindex}\) is the total cost component for a given period and scenario, defined by «
eTotalCComponent» (see (2)).\(R_{\periodindex,\scenarioindex}\) is the total revenue component for a given period and scenario, defined by «
eTotalRComponent» (see (3)).
The total cost is broken down into several components, each represented by a specific variable. The model seeks to find the optimal trade-off between these costs.
Electricity Grid Usage#
This component models capacity-based and tariffs, and considers the power peak penalization cost. The formulation is defined by «eNetGridUsageCost».
Peak Power Cost#
This cost subcomponent is determined by the highest power peak registered during a specific billing period (e.g., a month). This incents the model to “shave” demand peaks to reduce costs.
The formulation is defined by «eTotalElePeakCost».
Variable Network Usage Cost#
This cost subcomponent captures the expenses associated with using the electricity distribution or transmission network. It is typically based on the amount of energy consumed or injected into the grid over a billing period.
The formulation is defined by «eTotalEleNetUseVarCost».
Fixed Network Usage Cost#
This cost subcomponent represents fixed charges based on the capacity of the connection to the electricity network. It is usually a monthly fee that depends on the contracted capacity.
The formulation is defined by «eTotalEleNetUseFixCost».
By minimizing the sum of these components, the model finds the most economically efficient way to operate the system’s assets to meet energy demand reliably.
Market#
This represents the costs and revenues in the electricity and hydrogen markets.
Electricity Market Costs#
The formulation is defined by «eEleMarketCost».
Electricity Purchase: The cost incurred from purchasing electricity from the market. This cost is defined by the constraint «
eEleMarketDayAheadCost» and includes variable energy costs, taxes, and other fees.
Electricity Market Revenues#
The formulation is defined by «eEleMarketRevenue».
Electricity Sales: The revenue generated from selling electricity to the market. This is defined by the constraint «
eEleMarketDayAheadRevenue».
Hydrogen Market Costs#
The formulation is defined by «eHydMarketCost».
Hydrogen Purchase: The cost incurred from purchasing hydrogen from the market, as defined by «
eTotalHydTradeCost».
Hydrogen Market Revenues#
The formulation is defined by «eHydMarketRevenue».
Hydrogen Sales: The revenue generated from selling hydrogen to the market, as defined by «
eHydMarketDayAheadRevenue».
Electricity Grid Services#
This component captures revenues from providing ancillary services to the electricity grid, such as frequency regulation, spinning reserves, and voltage support.
The total revenue from ancillary services (\(\elemarketrevenueancillary_{\periodindex,\scenarioindex,\timeindex}\)) is defined by the constraint «eEleMarketFrequencyRevenue».
Frequency Containment Reserve for Disturbance (FCR-D)#
This revenue subcomponent is earned by bidding upward and downward frequency
containment reserves for disturbances. The upward and downward parts are defined
by «eEleMarketFCRDUpRevenue» and «eEleMarketFCRDDwRevenue», and their sum is:
Frequency Containment Reserve for Normal operation (FCR-N)#
This revenue subcomponent is earned by bidding frequency containment reserve for
normal operation, defined by «eEleMarketFCRNRevenue». FCR-N is a symmetric
product, so the price is the average of the upward and downward FCR-N prices:
where \(\pelefcrnprice\) is the average of the upward and downward FCR-N prices.
Note
Value-added tax (\(1 + \pelemarketmoms\)) is applied to energy purchases and sales, but not to the ancillary-service (FCR-D and FCR-N) revenues in the current model. Confirm this is intended before relying on the ancillary revenue figures.
Taxes and Pass-Throughs#
This component accounts for various taxes, surcharges, pass-through costs and incentives associated with electricity market transactions. These can include:
Tax Costs#
The total electricity tax cost is the energy tax («eEleTaxCost»), whose value is set by the energy-tax constraint («eEleTaxEnergyCost»):
Incentives and Certificate Revenues#
The total electricity tax revenue («eEleTaxRevenue») is the incentive/certificate revenue, defined by «eEleTaxISRevenue»:
Operation and Maintenance#
This is the operational cost of running the generation and production assets. It typically includes:
Variable Costs: Proportional to the energy produced (e.g., fuel costs).
No-Load Costs: The cost of keeping a unit online, even at minimum output.
Start-up and Shut-down Costs: Costs incurred when changing a unit’s commitment state.
The cost is defined by eEleOpMaintCost for electricity and eHydOpMaintCost for hydrogen.
Generation#
Electricity Generation Costs#
The formulation is defined by «eTotalEleGCost».
Hydrogen Generation Costs#
The formulation is defined by «eTotalHydGCost».
Emission Costs#
This component captures the cost of carbon emissions from fossil-fueled generators. It is calculated by multiplying the CO2 emission rate of each generator by its output and the carbon price (\(\pcarbonprice_{\genindex}\)).
The formulation is defined by «eTotalECost».
Consumption#
This represents the costs associated with operating energy consumers within the system, most notably the cost of power used to charge energy storage devices.
Electricity Consumption Costs#
The formulation is defined by «eTotalEleCCost».
Hydrogen Consumption Costs#
The formulation is defined by «eTotalHydCCost».
Reliability#
This is a penalty cost applied to any energy demand that cannot be met. It is calculated by multiplying the amount of unserved energy by a very high “value of lost load” (\(\ploadsheddingcost_{\demandindex}\)), ensuring the model prioritizes meeting demand. * Associated variables: \(\veleloadshed\) (Electricity Not Served), \(\vhydloadshed\) (Hydrogen Not Served).
Electricity Energy-not-served Costs#
The formulation is defined by «eTotalEleRCost».
Hydrogen Energy-not-served Costs#
The formulation is defined by «eTotalHydRCost».
Degradation#
This component models the degradation cost of electricity storage units, which is a function of the depth of discharge (DoD). The formulation is defined by «eTotalEleDCost».
Here:
\(\mathcal{I}^{DoD}\) is the set of predefined depth-of-discharge (DoD) intervals (e.g., shallow, medium, deep discharge), over which the index \(i\) ranges. The definition of these intervals is provided in the model data or parameter section.
\(C_{i,\storageindex}\) is the degradation cost coefficient for storage unit \(\storageindex\) and DoD interval \(i\). This coefficient represents the cost impact per unit of energy discharged within the \(i\)-th DoD range.
\(DoD_{i,\storageindex}\) is the amount of energy discharged from storage unit \(\storageindex\) in the \(i\)-th DoD range during the period, scenario, and day considered.
Note
Hydrogen storage degradation costs are set to zero in this model. This is an intentional simplification, as hydrogen storage degradation is either negligible, not supported by the current implementation, or may be considered in future model extensions.