Public API Reference
Device Formulations
Device formulations for hybrid systems (single PCC with renewable, thermal, and storage). Use with PowerSimulations.DeviceModel for unit commitment or economic dispatch.
HybridSystemsSimulations.HybridDispatchWithReserves — Type
HybridDispatchWithReservesDevice formulation for a hybrid system (single point of common coupling (PCC) with renewable, thermal, and storage) that participates in both energy and ancillary services markets. Implements the centralized production cost modeling (PCM) model where the hybrid plant's net power at the PCC is constrained by $P_{\max,\text{pcc}}$ and ancillary service allocations ($sb^{\text{out}}_{p,t}$, $sb^{\text{in}}_{p,t}$) are assigned to internal assets (thermal, renewable, charge, discharge) per the four-quadrant ancillary service model.
Use with a hybrid system in a PowerSimulations.DeviceModel for unit commitment or economic dispatch.
Variables:
PowerSimulations.ActivePowerOutVariable:- Bounds: [0.0, $P_{\max,\text{pcc}}$]
- Symbol: $p^{\text{out}}_t$
PowerSimulations.ActivePowerInVariable:- Bounds: [0.0, $P_{\max,\text{pcc}}$]
- Symbol: $p^{\text{in}}_t$
PowerSimulations.ReservationVariable:- Bounds: {0, 1}
- Symbol: $u^{\text{st}}_t$
ThermalPower:- Bounds: [0.0, $P_{\max,\text{th}}$] when on
- Symbol: $p^{\text{th}}_t$
- Bounds: {0, 1}
- Symbol: $u^{\text{th}}_t$
RenewablePower:- Bounds: [0.0, $P^{*,\text{re}}_t$]
- Symbol: $p^{\text{re}}_t$
BatteryCharge:- Bounds: [0.0, $P_{\max,\text{ch}}$] when charging
- Symbol: $p^{\text{ch}}_t$
BatteryDischarge:- Bounds: [0.0, $P_{\max,\text{ds}}$] when discharging
- Symbol: $p^{\text{ds}}_t$
PowerSimulations.EnergyVariable:- Bounds: [0.0, $E_{\max,\text{st}}$]
- Symbol: $e^{\text{st}}_t$
BatteryStatus:- Bounds: {0, 1}
- Symbol: $ss^{\text{st}}_t$ (0 = charge, 1 = discharge)
- Bounds: [0.0, ]
- Symbol: $sb^{\text{out}}_t$
- Bounds: [0.0, ]
- Symbol: $sb^{\text{in}}_t$
Time Series Parameters:
| Parameter | Default Time Series Name |
|---|---|
RenewablePowerTimeSeries | "RenewableDispatch__max_active_power" |
ElectricLoadTimeSeries | "PowerLoad__max_active_power" |
Data requirements:
- Device: A
PowerSystems.HybridSystemwith at least one of: thermal unit (PowerSystems.get_thermal_unit), renewable unit (PowerSystems.get_renewable_unit), storage (PowerSystems.get_storage), and optionally electric load (PowerSystems.get_electric_load). - Time series: Each hybrid must have forecast time series attached with the default names above (or custom names passed when adding parameters).
Static Parameters:
- $P_{\max,\text{pcc}}$ =
PowerSystems.get_output_active_power_limits(device).max - $P_{\max,\text{th}}$ =
PowerSystems.get_active_power_limits(thermal_unit).max - $P_{\min,\text{th}}$ =
PowerSystems.get_active_power_limits(thermal_unit).min - $P_{\max,\text{ch}}$ =
PowerSystems.get_input_active_power_limits(storage).max - $P_{\max,\text{ds}}$ =
PowerSystems.get_output_active_power_limits(storage).max - $\eta_{\text{ch}}$ =
PowerSystems.get_efficiency(storage).in - $\eta_{\text{ds}}$ =
PowerSystems.get_efficiency(storage).out - $E_{\max,\text{st}}$ =
PowerSystems.get_storage_level_limits(storage).max × capacity - $E^{\text{st}}_0$ = initial storage energy
- $R^{*}_{p,t}$ = ancillary service deployment forecast for service $p$ at time $t$
- $F_p$ = fraction of $P_{\max,\text{pcc}}$ allowed for service $p$
- $N_p$ = number of periods of compliance for service $p$
Expressions:
Adds $p^{\text{out}}_t$ and $p^{\text{in}}_t$ to PowerSimulations' ActivePowerBalance expression for use in network balance constraints. When services are present, adds reserve expressions (TotalReserveOutUpExpression, TotalReserveOutDownExpression, TotalReserveInUpExpression, TotalReserveInDownExpression) and served reserve expressions for tracking deployed reserves.
Constraints:
Let $\mathcal{T} = \{1, \dots, T\}$ denote the set of time steps.
PCC and status (PowerSimulations.InputActivePowerVariableLimitsConstraint, PowerSimulations.OutputActivePowerVariableLimitsConstraint, StatusOutOn, StatusInOn):
\[\begin{align*} & 0 \leq p^{\text{in}}_t \leq P_{\max,\text{pcc}}, \quad 0 \leq p^{\text{out}}_t \leq P_{\max,\text{pcc}}, \quad \forall t \in \mathcal{T} \\ & u^{\text{st}}_t \in \{0,1\} \quad \text{(output/input status at PCC)} \end{align*}\]
Energy asset balance (EnergyAssetBalance):
\[p^{\text{th}}_t + p^{\text{re}}_t + p^{\text{ds}}_t - p^{\text{ch}}_t - P^{\text{ld}}_t = p^{\text{out}}_t - p^{\text{in}}_t, \quad \forall t \in \mathcal{T}\]
Thermal limits (ThermalOnVariableUb, ThermalOnVariableLb):
\[u^{\text{th}}_t P_{\min,\text{th}} \leq p^{\text{th}}_t \leq u^{\text{th}}_t P_{\max,\text{th}}, \quad u^{\text{th}}_t \in \{0,1\}, \quad \forall t \in \mathcal{T}\]
Renewable limit (RenewableActivePowerLimitConstraint):
\[0 \leq p^{\text{re}}_t \leq P^{*,\text{re}}_t, \quad \forall t \in \mathcal{T}\]
Storage charge/discharge status (BatteryStatusChargeOn, BatteryStatusDischargeOn):
\[\begin{align*} & p^{\text{ch}}_t \leq (1 - ss^{\text{st}}_t) P_{\max,\text{ch}}, \quad p^{\text{ds}}_t \leq ss^{\text{st}}_t P_{\max,\text{ds}}, \quad \forall t \in \mathcal{T} \\ & ss^{\text{st}}_t \in \{0,1\} \quad \text{(0 = charge, 1 = discharge)} \end{align*}\]
Storage energy balance (BatteryBalance):
\[e^{\text{st}}_t = e^{\text{st}}_{t-1} + \Delta t \left( \eta_{\text{ch}} p^{\text{ch}}_t - \frac{p^{\text{ds}}_t}{\eta_{\text{ds}}} \right), \quad \forall t \in \mathcal{T}, \quad e^{\text{st}}_0 = E^{\text{st}}_0\]
When ancillary services are present: ThermalReserveLimit, RenewableReserveLimit, ChargingReservePowerLimit, DischargingReservePowerLimit, ReserveCoverageConstraint, ReserveCoverageConstraintEndOfPeriod, HybridReserveAssignmentConstraint, ReserveBalance.
Cycling limits (if "cycling" => true), (CyclingCharge, CyclingDischarge):
\[\begin{align*} & \eta_{\text{ch}} \Delta t \sum_{t \in \mathcal{T}} p^{\text{ch}}_t \leq C_{\text{st}} E_{\max,\text{st}} \\ & \frac{\Delta t}{\eta_{\text{ds}}} \sum_{t \in \mathcal{T}} p^{\text{ds}}_t \leq C_{\text{st}} E_{\max,\text{st}} \end{align*}\]
End-of-horizon energy target (if "energy_target" => true), (StateofChargeTargetConstraint):
\[e^{\text{st}}_T = E^{\text{st}}_T\]
Regularization (if "regularization" => true): ChargeRegularizationConstraint, DischargeRegularizationConstraint.
Objective:
Adds cost terms for thermal generation (variable and fixed costs), storage variable O&M, renewable variable cost, and penalties for energy target deviations (if enabled).
HybridSystemsSimulations.HybridEnergyOnlyDispatch — Type
HybridEnergyOnlyDispatchDevice formulation for a hybrid system that participates in energy only (no ancillary services). Net power at the point of common coupling (PCC) is $p^{\text{out}}_t - p^{\text{in}}_t$ from thermal, renewable, discharge, minus charge and load; subject to $P_{\max,\text{pcc}}$ and asset limits.
Variables:
PowerSimulations.ActivePowerOutVariable:- Bounds: [0.0, $P_{\max,\text{pcc}}$]
- Symbol: $p^{\text{out}}_t$
PowerSimulations.ActivePowerInVariable:- Bounds: [0.0, $P_{\max,\text{pcc}}$]
- Symbol: $p^{\text{in}}_t$
PowerSimulations.ReservationVariable:- Bounds: {0, 1}
- Symbol: $u^{\text{st}}_t$
ThermalPower:- Bounds: [0.0, $P_{\max,\text{th}}$] when on
- Symbol: $p^{\text{th}}_t$
- Bounds: {0, 1}
- Symbol: $u^{\text{th}}_t$
RenewablePower:- Bounds: [0.0, $P^{*,\text{re}}_t$]
- Symbol: $p^{\text{re}}_t$
BatteryCharge:- Bounds: [0.0, $P_{\max,\text{ch}}$] when charging
- Symbol: $p^{\text{ch}}_t$
BatteryDischarge:- Bounds: [0.0, $P_{\max,\text{ds}}$] when discharging
- Symbol: $p^{\text{ds}}_t$
PowerSimulations.EnergyVariable:- Bounds: [0.0, $E_{\max,\text{st}}$]
- Symbol: $e^{\text{st}}_t$
BatteryStatus:- Bounds: {0, 1}
- Symbol: $ss^{\text{st}}_t$ (0 = charge, 1 = discharge)
Time Series Parameters:
| Parameter | Default Time Series Name |
|---|---|
RenewablePowerTimeSeries | "RenewableDispatch__max_active_power" |
ElectricLoadTimeSeries | "PowerLoad__max_active_power" |
Data requirements:
- Device: A
PowerSystems.HybridSystemwith at least one of: thermal unit (PowerSystems.get_thermal_unit), renewable unit (PowerSystems.get_renewable_unit), storage (PowerSystems.get_storage), and optionally electric load (PowerSystems.get_electric_load). - Time series: Each hybrid must have forecast time series attached with the default names above (or custom names passed when adding parameters).
Static Parameters:
- $P_{\max,\text{pcc}}$ =
PowerSystems.get_output_active_power_limits(device).max - $P_{\max,\text{th}}$ =
PowerSystems.get_active_power_limits(thermal_unit).max - $P_{\min,\text{th}}$ =
PowerSystems.get_active_power_limits(thermal_unit).min - $P_{\max,\text{ch}}$ =
PowerSystems.get_input_active_power_limits(storage).max - $P_{\max,\text{ds}}$ =
PowerSystems.get_output_active_power_limits(storage).max - $\eta_{\text{ch}}$ =
PowerSystems.get_efficiency(storage).in - $\eta_{\text{ds}}$ =
PowerSystems.get_efficiency(storage).out - $E_{\max,\text{st}}$ =
PowerSystems.get_storage_level_limits(storage).max × capacity - $E^{\text{st}}_0$ = initial storage energy
Expressions:
Adds $p^{\text{out}}_t$ and $p^{\text{in}}_t$ to PowerSimulations' ActivePowerBalance expression for use in network balance constraints.
Constraints:
Let $\mathcal{T} = \{1, \dots, T\}$ denote the set of time steps.
PCC and status (PowerSimulations.InputActivePowerVariableLimitsConstraint, PowerSimulations.OutputActivePowerVariableLimitsConstraint, StatusOutOn, StatusInOn):
\[\begin{align*} & 0 \leq p^{\text{in}}_t \leq P_{\max,\text{pcc}}, \quad 0 \leq p^{\text{out}}_t \leq P_{\max,\text{pcc}}, \quad \forall t \in \mathcal{T} \\ & u^{\text{st}}_t \in \{0,1\} \quad \text{(output/input status at PCC)} \end{align*}\]
Energy asset balance (EnergyAssetBalance):
\[p^{\text{th}}_t + p^{\text{re}}_t + p^{\text{ds}}_t - p^{\text{ch}}_t - P^{\text{ld}}_t = p^{\text{out}}_t - p^{\text{in}}_t, \quad \forall t \in \mathcal{T}\]
Thermal limits (ThermalOnVariableUb, ThermalOnVariableLb):
\[u^{\text{th}}_t P_{\min,\text{th}} \leq p^{\text{th}}_t \leq u^{\text{th}}_t P_{\max,\text{th}}, \quad u^{\text{th}}_t \in \{0,1\}, \quad \forall t \in \mathcal{T}\]
Renewable limit (RenewableActivePowerLimitConstraint):
\[0 \leq p^{\text{re}}_t \leq P^{*,\text{re}}_t, \quad \forall t \in \mathcal{T}\]
Storage charge/discharge status (BatteryStatusChargeOn, BatteryStatusDischargeOn):
\[\begin{align*} & p^{\text{ch}}_t \leq (1 - ss^{\text{st}}_t) P_{\max,\text{ch}}, \quad p^{\text{ds}}_t \leq ss^{\text{st}}_t P_{\max,\text{ds}}, \quad \forall t \in \mathcal{T} \\ & ss^{\text{st}}_t \in \{0,1\} \quad \text{(0 = charge, 1 = discharge)} \end{align*}\]
Storage energy balance (BatteryBalance):
\[e^{\text{st}}_t = e^{\text{st}}_{t-1} + \Delta t \left( \eta_{\text{ch}} p^{\text{ch}}_t - \frac{p^{\text{ds}}_t}{\eta_{\text{ds}}} \right), \quad \forall t \in \mathcal{T}, \quad e^{\text{st}}_0 = E^{\text{st}}_0\]
Cycling limits (if "cycling" => true), (CyclingCharge, CyclingDischarge):
\[\begin{align*} & \eta_{\text{ch}} \Delta t \sum_{t \in \mathcal{T}} p^{\text{ch}}_t \leq C_{\text{st}} E_{\max,\text{st}} \\ & \frac{\Delta t}{\eta_{\text{ds}}} \sum_{t \in \mathcal{T}} p^{\text{ds}}_t \leq C_{\text{st}} E_{\max,\text{st}} \end{align*}\]
End-of-horizon energy target (if "energy_target" => true), (StateofChargeTargetConstraint):
\[e^{\text{st}}_T = E^{\text{st}}_T\]
Regularization (if "regularization" => true): ChargeRegularizationConstraint, DischargeRegularizationConstraint.
Objective:
Adds cost terms for thermal generation (variable and fixed costs), storage variable O&M, renewable variable cost, and penalties for energy target deviations (if enabled).
HybridSystemsSimulations.HybridFixedDA — Type
HybridFixedDADevice formulation for a hybrid system with day-ahead (DA) energy bids/offers fixed; used in multi-step simulations when the real-time (RT) subproblem is solved with locked DA positions (e.g. merchant co-optimization with "then vs. now" RT adjustment).
Variables:
PowerSimulations.ActivePowerOutVariable:- Bounds: [0.0, $P_{\max,\text{pcc}}$]
- Symbol: $p^{\text{out}}_t$
PowerSimulations.ActivePowerInVariable:- Bounds: [0.0, $P_{\max,\text{pcc}}$]
- Symbol: $p^{\text{in}}_t$
TotalReserve(if services present):- Bounds: [0.0, ]
- Symbol: total reserve at PCC
Data requirements:
- Device: A
PowerSystems.HybridSystemwith PCC limits. Internal asset composition is not modeled in this formulation; only net power at the PCC and optional total reserve are used. - Price and horizon data: Horizon and price data are provided through the merchant decision models (e.g.
MerchantHybridEnergyCase,MerchantHybridCooptimizerCase) using theextsupplemental data dictionary on the system and hybrids as described in their docstrings.
Expressions:
Adds $p^{\text{out}}_t$ and $p^{\text{in}}_t$ to PowerSimulations' ActivePowerBalance expression for use in network balance constraints.
Constraints:
PCC power limits (PowerSimulations.InputActivePowerVariableLimitsConstraint, PowerSimulations.OutputActivePowerVariableLimitsConstraint):
\[0 \leq p^{\text{in}}_t \leq P_{\max,\text{pcc}}, \quad 0 \leq p^{\text{out}}_t \leq P_{\max,\text{pcc}}, \quad \forall t \in \mathcal{T}\]
When ancillary services are present: HybridReserveAssignmentConstraint links component reserves to total reserve at the PCC.
Decision Models
Decision problem types for merchant hybrid participation in day-ahead and real-time markets.
HybridSystemsSimulations.MerchantHybridEnergyCase — Type
MerchantHybridEnergyCaseDecision problem for a merchant hybrid resource that co-optimizes energy bids/offers in day-ahead and real-time markets only (no ancillary services). The hybrid optimizer maximizes profit from energy (e.g. DA/RT spread) subject to internal asset limits.
Data requirements:
System: A
PowerSystems.Systemcontaining at least onePowerSystems.HybridSystemwith the subcomponents required by the chosen device formulation (e.g.HybridEnergyOnlyDispatch).Attached scalar time series (each hybrid): Market prices are bus-selected
InfrastructureSystems.SingleTimeSeriesobjects with distinct names for each logical key (defaults"DA"/"RT"): seehybrid_energy_price_time_series_name. Profiles use the standard renewable/load names below. Override keys viamodel.ext["day_ahead_time_series_key"]/"real_time_time_series_key"on thePowerSimulations.DecisionModel.Role Time series name Day-ahead energy price hybrid_energy_price_time_series_name(day_ahead_time_series_key)Real-time energy price hybrid_energy_price_time_series_name(real_time_time_series_key)Renewable availability "RenewableDispatch__max_active_power"Electric load "PowerLoad__max_active_power"
Horizons, resolutions, and DA↔RT step alignment come from model settings plus series metadata (not from System/Hybrid ext DataFrames or "λ_*" keys).
HybridSystemsSimulations.MerchantHybridEnergyFixedDA — Type
MerchantHybridEnergyFixedDADecision problem for a merchant hybrid with fixed day-ahead energy positions; used when solving the real-time subproblem with locked DA bids/offers.
Data requirements:
- Same
PowerSystems.System,PowerSystems.HybridSystem, and hybrid-attached time-series contract asMerchantHybridEnergyCase(keyed scalar DA/RT prices and profiles on each hybrid).
HybridSystemsSimulations.MerchantHybridCooptimizerCase — Type
MerchantHybridCooptimizerCaseDecision problem for a merchant hybrid that co-optimizes energy and ancillary services in day-ahead and real-time markets. Maximizes $d'y - c_h' x$ (revenue from bids/offers minus operating cost) subject to market and asset constraints; ancillary services are committed in DA and fulfilled by internal asset allocation in RT.
Data requirements:
- System: As for
MerchantHybridEnergyCase. The problem template must include aPowerSimulations.DeviceModelconstructed asDeviceModel(PSY.HybridSystem, HybridDispatchWithReserves)(or another appropriate hybrid formulation with reserves). - Hybrid-attached time series: Same DA/RT keyed energy prices and renewable/load series as
MerchantHybridEnergyCase. Additionally, for each ancillary product attached to the hybrid, attach a scalarSingleTimeSeriesnamedhybrid_ancillary_service_price_time_series_name(<service_name>,<day_ahead_key>).
HybridSystemsSimulations.MerchantHybridBilevelCase — Type
MerchantHybridBilevelCaseDecision problem implementing a bilevel formulation for the merchant hybrid (e.g. upper level: bids/offers, lower level: internal dispatch); used for equilibrium or regulatory analysis.
Data requirements:
- System: Same as
MerchantHybridEnergyCase(at least onePowerSystems.HybridSystemwith required forecasts). - Hybrid-attached time series: Same keyed scalar DA/RT market and profile series as
MerchantHybridEnergyCase.
Variables
Energy Bids
Day-ahead and real-time energy bid/offer variables at the PCC.
HybridSystemsSimulations.EnergyDABidOut — Type
EnergyDABidOutVariable type for day-ahead energy offer (generating power) at the point of common coupling (PCC).
Docs abbreviation: $e^{\text{out}}_{\text{DA},t} \in [0, P_{\max,\text{pcc}}]$ [MW].
HybridSystemsSimulations.EnergyDABidIn — Type
EnergyDABidInVariable type for day-ahead energy bid (consuming power) at the point of common coupling (PCC).
Docs abbreviation: $e^{\text{in}}_{\text{DA},t} \in [0, P_{\max,\text{pcc}}]$ [MW].
HybridSystemsSimulations.EnergyRTBidOut — Type
EnergyRTBidOutVariable type for real-time energy offer at the point of common coupling (PCC).
Docs abbreviation: $e^{\text{out}}_{\text{RT},t}$. Net RT position with DA locked is used in the merchant profit expression (e.g. DART spread).
HybridSystemsSimulations.EnergyRTBidIn — Type
EnergyRTBidInVariable type for real-time energy bid at the point of common coupling (PCC).
Docs abbreviation: $e^{\text{in}}_{\text{RT},t}$.
Ancillary Service Bids
Day-ahead ancillary service bid/offer variables at the PCC.
HybridSystemsSimulations.BidReserveVariableOut — Type
BidReserveVariableOutVariable type for day-ahead ancillary service offer (generation direction) for the hybrid at the point of common coupling (PCC).
Docs abbreviation: $sb^{\text{out}}_{p,t} \in [0, F_p P_{\max,\text{pcc}}]$ for product $p$.
HybridSystemsSimulations.BidReserveVariableIn — Type
BidReserveVariableInVariable type for day-ahead ancillary service bid (consumption direction) for the hybrid at the point of common coupling (PCC).
Docs abbreviation: $sb^{\text{in}}_{p,t} \in [0, F_p P_{\max,\text{pcc}}]$ for product $p$.
Reserve Variables
Reserve quantities allocated to the hybrid's internal assets and total reserve.
HybridSystemsSimulations.ReserveVariableOut — Type
ReserveVariableOutVariable type for ancillary service reserve quantity in the "out" (generation) direction allocated to the hybrid's internal assets ($sb^{\text{th}}$, $sb^{\text{re}}$, $sb^{\text{ds}}$, $sb^{\text{ch}}$).
HybridSystemsSimulations.ReserveVariableIn — Type
ReserveVariableInVariable type for ancillary service reserve quantity in the "in" (consumption) direction allocated to the hybrid's internal assets.
HybridSystemsSimulations.TotalReserve — Type
TotalReserveAuxiliary variable type for the total reserve quantity (sum of component reserves) at the point of common coupling (PCC). Used in reserve balance constraints; not written to results by default.
Feedforwards
Feedforwards for hybrid storage cycle limits in recurrent simulations.
HybridSystemsSimulations.CyclingChargeLimitFeedforward — Type
CyclingChargeLimitFeedforwardFeedforward that enforces a cumulative charging cycle limit on the hybrid's storage over the simulation. The constraint is $\eta_{\text{ch}} \Delta t \sum_t (p_{\text{ch},t} + s^{\text{down}}_{\text{reg},t} - s^{\text{up}}_{\text{reg},t}) \leq \text{limit}$, where $s^{\text{up}}_{\text{reg},t}$ and $s^{\text{down}}_{\text{reg},t}$ denote served reserve (up/down). The limit is from CyclingChargeLimitParameter in recurrent solves or $C_{\text{horizon}} \times E_{\max,\text{st}}$ otherwise. Use with PowerSimulations' add_feedforward! in a PowerSimulations.DeviceModel for HybridDispatchWithReserves or HybridEnergyOnlyDispatch.
Input data:
- Storage limits: Limit supplied by
CyclingChargeLimitParameter, which is derived from the hybrid's storage usingPowerSystems.get_cycle_limitsandPowerSystems.get_storage_level_limits. - Not compatible with the device attribute
"cycling" => true(cycling limits are then enforced in the formulation).
HybridSystemsSimulations.CyclingDischargeLimitFeedforward — Type
CyclingDischargeLimitFeedforwardFeedforward that enforces a cumulative discharging cycle limit on the hybrid's storage: $(1/\eta_{\text{ds}}) \Delta t \sum_t (p_{\text{ds},t} + s^{\text{up}}_{\text{reg},t} - s^{\text{down}}_{\text{reg},t}) \leq \text{limit}$, where $s^{\text{up}}_{\text{reg},t}$ and $s^{\text{down}}_{\text{reg},t}$ denote served reserve (up/down). The limit comes from CyclingDischargeLimitParameter in recurrent runs. See CyclingChargeLimitFeedforward for usage pattern.
Input data:
- Same as
CyclingChargeLimitFeedforward: limit fromCyclingDischargeLimitParameter, derived from the hybrid's storage usingPowerSystems.get_cycle_limitsandPowerSystems.get_storage_level_limits. - Not compatible with device attribute
"cycling" => true.
Constraints
Dual Optimality Conditions
KKT stationarity constraints for the merchant (lower-level) model; used in bilevel/MPEC formulations.
HybridSystemsSimulations.OptConditionThermalPower — Type
OptConditionThermalPowerConstraint enforcing Karush-Kuhn-Tucker (KKT) stationarity for thermal power in the merchant (lower-level) model: links dual of thermal limits ($\mu^{\text{ThUb}}$, $\mu^{\text{ThLb}}$) to the thermal power variable. Used in bilevel/mathematical program with equilibrium constraints (MPEC) formulations.
HybridSystemsSimulations.OptConditionRenewablePower — Type
OptConditionRenewablePowerConstraint enforcing Karush-Kuhn-Tucker (KKT) stationarity for renewable power ($p_{\text{re},t}$) in the merchant model; ties duals of renewable limit ($\mu^{\text{ReUb}}$, $\mu^{\text{ReLb}}$) to the renewable power variable.
HybridSystemsSimulations.OptConditionBatteryCharge — Type
OptConditionBatteryChargeConstraint enforcing Karush-Kuhn-Tucker (KKT) stationarity for storage charging ($p_{\text{ch},t}$) in the merchant model; involves duals $\mu^{\text{ChUb}}$, $\mu^{\text{ChLb}}$ and charge limits.
HybridSystemsSimulations.OptConditionBatteryDischarge — Type
OptConditionBatteryDischargeConstraint enforcing Karush-Kuhn-Tucker (KKT) stationarity for storage discharging ($p_{\text{ds},t}$) in the merchant model; involves duals $\mu^{\text{DsUb}}$, $\mu^{\text{DsLb}}$.
HybridSystemsSimulations.OptConditionEnergyVariable — Type
OptConditionEnergyVariableConstraint enforcing Karush-Kuhn-Tucker (KKT) stationarity for the energy variable at the point of common coupling (PCC) in the merchant model.
Complementary Slackness
Complementary slackness constraints for MPEC/bilevel reformulation. Each upper-bound (Ub) constraint has a corresponding lower-bound (Lb) variant.
HybridSystemsSimulations.ComplementarySlacknessEnergyAssetBalanceUb — Type
ComplementarySlacknessEnergyAssetBalanceUbComplementary slackness constraint (upper bound) for the energy asset balance equation in the merchant model; used in mathematical program with equilibrium constraints (MPEC)/bilevel reformulation.
HybridSystemsSimulations.ComplementarySlacknessEnergyAssetBalanceLb — Type
ComplementarySlacknessEnergyAssetBalanceLbComplementary slackness constraint (lower bound) for the energy asset balance.
HybridSystemsSimulations.ComplementarySlacknessRenewableActivePowerLimitConstraintUb — Type
ComplementarySlacknessRenewableActivePowerLimitConstraintUbComplementary slackness (upper bound) for renewable active power limit ($p_{\text{re},t} \leq P^*_{\text{re},t}$).
HybridSystemsSimulations.ComplementarySlacknessRenewableActivePowerLimitConstraintLb — Type
ComplementarySlacknessRenewableActivePowerLimitConstraintLbComplementary slackness (lower bound) for renewable active power limit.
HybridSystemsSimulations.ComplementarySlacknessBatteryStatusDischargeOnUb — Type
ComplementarySlacknessBatteryStatusDischargeOnUbComplementary slackness (upper bound) for battery status discharge-on constraint ($ss_{\text{st},t}$).
HybridSystemsSimulations.ComplementarySlacknessBatteryStatusDischargeOnLb — Type
ComplementarySlacknessBatteryStatusDischargeOnLbComplementary slackness (lower bound) for battery status discharge-on constraint.
HybridSystemsSimulations.ComplementarySlacknessBatteryStatusChargeOnUb — Type
ComplementarySlacknessBatteryStatusChargeOnUbComplementary slackness (upper bound) for battery status charge-on constraint.
HybridSystemsSimulations.ComplementarySlacknessBatteryStatusChargeOnLb — Type
ComplementarySlacknessBatteryStatusChargeOnLbComplementary slackness (lower bound) for battery status charge-on constraint.
HybridSystemsSimulations.ComplementarySlacknessBatteryBalanceUb — Type
ComplementarySlacknessBatteryBalanceUbComplementary slackness (upper bound) for storage energy balance ($e_{\text{st},t}$).
HybridSystemsSimulations.ComplementarySlacknessBatteryBalanceLb — Type
ComplementarySlacknessBatteryBalanceLbComplementary slackness (lower bound) for storage energy balance.
HybridSystemsSimulations.ComplementarySlacknessCyclingCharge — Type
ComplementarySlacknessCyclingChargeComplementary slackness for the charging cycle limit ($c_{\text{ch}}^-$).
HybridSystemsSimulations.ComplementarySlacknessCyclingDischarge — Type
ComplementarySlacknessCyclingDischargeComplementary slackness for the discharging cycle limit ($c_{\text{ds}}^-$).
HybridSystemsSimulations.ComplementarySlacknessEnergyLimitUb — Type
ComplementarySlacknessEnergyLimitUbComplementary slackness (upper bound) for storage energy capacity ($e_{\text{st},t} \leq E_{\max,\text{st}}$).
HybridSystemsSimulations.ComplementarySlacknessEnergyLimitLb — Type
ComplementarySlacknessEnergyLimitLbComplementary slackness (lower bound) for storage energy capacity.
Strong Duality
HybridSystemsSimulations.StrongDualityCut — Type
StrongDualityCutConstraint that enforces strong duality for the merchant (lower-level) problem in a bilevel formulation: objective value equals dual objective (or equivalent cut), so that the lower level is replaced by its Karush-Kuhn-Tucker (KKT) conditions.
Parameters
Objective Function Parameters
Price parameters used in the merchant objective (DA/RT energy and ancillary services).
HybridSystemsSimulations.DayAheadEnergyPrice — Type
DayAheadEnergyPriceObjective function parameter for day-ahead energy price.
Docs abbreviation: $\Pi^*_{\text{DA},t}$ (USD/MWh). Used in the merchant objective (e.g. $f_{\text{DA},t}$ term) when building the decision model.
Input data:
- Hybrid-attached time series: Each
PowerSystems.HybridSystemmust have a bus-selected scalar day-ahead energy price series whose name is given byhybrid_energy_price_time_series_name(<day_ahead_key>)(default key"DA"), stored asInfrastructureSystems.SingleTimeSeries/ deterministic forecast. Values are taken over the model horizon from forecast timestamps starting at the problem initial time.
HybridSystemsSimulations.RealTimeEnergyPrice — Type
RealTimeEnergyPriceObjective function parameter for real-time energy price.
Docs abbreviation: $\Pi^*_{\text{RT},t}$ (USD/MWh). Used in the merchant profit expression for RT energy and DART spread.
Input data:
- Hybrid-attached time series: Real-time energy price uses
hybrid_energy_price_time_series_name(<real_time_key>)(default key"RT"). Day-ahead ↔ real-time alignment for spread terms uses variable axis sizes and an internal index map derived from model horizons, not hybridext.
HybridSystemsSimulations.AncillaryServicePrice — Type
AncillaryServicePriceObjective function parameter for ancillary service price.
Docs abbreviation: $\Pi^*_{p,t}$ (USD/MWh) for service $p \in P$. Used in the DA profit term for ancillary services ($sb^{\text{out}}$ + $sb^{\text{in}}$).
Input data:
- Hybrid-attached time series: For each attached ancillary product, a scalar series named per
hybrid_ancillary_service_price_time_series_name(<service_name>, <day_ahead_key>). Used byMerchantHybridCooptimizerCasewhen services are attached to the hybrid.
Variable Value Parameters
Parameters for storage cycle limits (used with feedforwards in recurrent runs).
HybridSystemsSimulations.CyclingChargeLimitParameter — Type
CyclingChargeLimitParameterVariable-value parameter that provides the right-hand side for the storage charging cycle limit: $\eta_{\text{ch}} \Delta t \sum_t p_{\text{ch},t} - c_{\text{ch}}^- \leq C_{\text{st}} E_{\max,\text{st}}$. Used with CyclingChargeLimitFeedforward in recurrent simulations to pass cumulative cycling from previous horizons.
Input data:
- Storage limits: Initial values (when not updated from state) are computed from the hybrid's storage using
PowerSystems.get_cycle_limitsandPowerSystems.get_storage_level_limits. - State updates: In recurrent runs, values are updated from the simulation state (cumulative charge usage).
HybridSystemsSimulations.CyclingDischargeLimitParameter — Type
CyclingDischargeLimitParameterVariable-value parameter for the storage discharging cycle limit: $(\Delta t/\eta_{\text{ds}}) \sum_t p_{\text{ds},t} - c_{\text{ds}}^- \leq C_{\text{st}} E_{\max,\text{st}}$. Used with CyclingDischargeLimitFeedforward.
Input data:
- Same as
CyclingChargeLimitParameter: initial values based onPowerSystems.get_cycle_limitsandPowerSystems.get_storage_level_limitsfor the hybrid's storage; in recurrent runs, updated from state (cumulative discharge usage).