arXiv:2610.40918math.OCOct 2026

Manuscript Offprint

arXiv:2610.40918

Fast and Accurate Hydro Unit Commitment

Shaked Regev, Evan J. R. Brody

Shaked Regev and Evan J. R. Brody

Oak Ridge National Laboratory

1 Bethel Valley Road

Oak Ridge, Tennessee, USA

Abstract—We introduce a fast novel algorithm to commit hydro-generators. We show that our algorithm can commit 56 generators for 200 days 10,000 times faster than Hexaly, the leading commercial solver for scheduling problems, without sacrificing solution quality. Our method can commit 1792 generators for an entire year in approximately 20 seconds on commodity hardware. Hexaly is unable to solve problems of this size in reasonable time. We attain this runtime improvement by introducing a greedy-heuristic tailored for hydro units. We provide a direction for a possible proof that the error our solver makes decreases with the problem size. This is supported by our experimental results. We prove that our solver's runtime scales log-linearly in the number of generators and time periods.

Index Terms—unit commitment, power systems, hydro generators, long term scheduling

I. INTRODUCTION

Hydropower is the main naturally replenishing, quickly dispatchable, and zero marginal cost generation source worldwide. Further, it can react quickly to respond to changing grid conditions and can start up with no supporting electricity, for example after a blackout [1]. Worldwide it accounts for about 14% of total electricity generation [2].

Co-optimizing hydro units with traditional, fuel-consuming units is essential to reduce generation costs while properly managing water levels. This is known as long term hydrothermal scheduling (LTHS) [3]. We focus on hydropower reservoirs, which are charged uncontrollably by rainfall and discharged controllably, subject to water balance constraints [4]. We defer pumped hydropower, which functions as a battery with controllable charging and discharging [5], to future work.

The main challenge in solving LTHS is that traditional units must be highly optimized over relatively short time scales to reduce costs. However, hydro units main cost is an opportunity cost, i.e. if they run now, they may not be able to run later. This means they must be optimized over long (typically yearly) time-horizons [3], [6].

Notice: This manuscript has been authored by UT-Battelle, LLC, under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The US government retains and the publisher, by accepting the article for publication, acknowledges that the US government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US government purposes. DOE will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan (https://www.energy.gov/doe-public-access-plan). Research sponsored by the Laboratory Directed Research and Development Program of Oak Ridge National Laboratory, managed by UT-Battelle, LLC, for the US Department of Energy.

Existing work typically uses relatively slow LTHS solvers, which cannot run frequently. Therefore they require relatively accurate rainfall predictions or methods to deal with the inaccuracies of said predictions [7], [8]. This introduces a tradeoff between optimizing for low generation costs and meeting contingencies in the mean and allowing for sufficient slack to account for inevitable large deviations from predictions 1^{1}.

Instead, knowing that forecasts will frequently fluctuate, we focus on developing a very fast solver for committing hydro units, which can be rerun every 5 minutes without contributing substantially to the overall time to solve LTHS. Our solver can consider long term predictions, but is agile enough to adapt as they change. It is designed primarily for grids where hydropower accounts for a relatively small percentage of total electricity generation, such as the US, where it is about 6% [10]. The main contributions of this paper are:

• Introducing a fast, scalable log-linear algorithm for scheduling hydro units as an alternative to existing exponential ones.

• Showing that in all of our tests, our solvers produce solutions with identical objective values to a commercial solver in much less time. Our solutions are always feasible, with no constraint violations, and within tolerance of the lower bound on the optimum.

• Providing some analytical guarantees on the accuracy and runtime of our algorithms.

Some limitations on the scope of this study include:

  • Our grid model does not include transmission constraints. One can run our algorithm on a zonal level to set target production periods for the hydro units. Then one can add these targets to the objective function and solve a full alternating current optimal power flow (ACOPF) problem [11] to guarantee feasibility.

  • Our solver is not a general solution for all integer programs or scheduling problems.

The paper is organized as follows: Section II introduces our long-horizon planning hydro unit commitment (UC) problem formulation and algorithm. Section III explains the details of the data acquisition and simulation setup. Section IV compares our solver with the commercial solver Hexaly [12]. Section V summarizes our results and future research directions.

1^{1}For example, in January-September 2026, rainfall was 8% lower on average in the US compared to the same period in 2025. Some states received less than 75% of 2026 rainfalls [9].

II. MATHEMATICAL FORMULATION

Frequency vs Marginal Cost and Demand (PJM Scale)

We now introduce a mathematical formulation for the problem of committing hydro units. This approach is intended to be used to commit hydro units before committing traditional units. This decoupling is justified because hydro units recharge by natural water flow and cannot indefinitely hoard water due to dam capacity. So as long units maintain high water levels long term, there is little opportunity cost.

Hydro units are fast ramping [13] and typically have a narrow efficient operation regime [14]. Here, we make the simplifying assumptions that hydro units can only be on at max capacity or off, the starting water levels are far away from 0 and the maximum dam capacity, and water evaporation rates are independent of water levels.

We denote by Wi([T])W_i([T]) the amount of water projected to flow into reservoir ii over a certain time window [T]≐{1,…,T}[T] \doteq \{1, \ldots, T\}. We denote by W~i\tilde{W}_i the water required for hydro unit ii to produce electricity in one time period. The number of time periods it can operate within window [T][T] is πi≐min⁡(Wi([T])/W~i,T)\pi_i \doteq \min(W_i([T])/{\tilde{W}_i}, T). This reduces our problem to finding in which periods t∈[T]t \in [T] to operate each unit.

Hydro generators not being able to run all of the time (or even most of it) means they require optimizing over long-term, for example yearly, cycles. We therefore design a method to commit hydro generators based on shifting predicted demands. For this purpose, we introduce the notion of the marginal cost of the system.

The marginal cost of a UC of traditional generators is the cost difference to produce slightly more or less power. Consider a cost model unit ii's production

ui(aiPi2+biPi+ci),(1)u_i(a_i P_i^2 + b_i P_i + c_i), \tag{1}

where ui=0u_i = 0 if the unit is off and 1 if it's on, PiP_i is the power produced by the unit, and ai,bi,cia_i, b_i, c_i are cost coefficients. If ui=0u_i = 0, unit ii's marginal cost is undefined (it cannot produce slightly more or slightly less power). If ui=1u_i = 1, the marginal cost of a unit with the production profile of Eq. (1) is its derivative with respect to PiP_i, 2aiPi+bi2a_i P_i + b_i.

Each PiP_i is limited between some maximum and minimum due to production and ramping capabilities. All on units not at the feasibility boundary must have the same marginal cost (2aiPi+bi)(2a_i P_i + b_i) at the optimal solution. Otherwise, shifting one unit's production up and one down would reduce cost. We define the marginal cost of the system as (2aiPi+bi)(2a_i P_i + b_i) for one such of these units ii.

We derive marginal costs from the solutions to a UC problem with traditional generators [15]. Fig. 1 shows how commonly certain demands coincide with certain marginal costs. A high demand always leads to high marginal costs and low demand always leads to low costs. There are small deviations in this trend due to periods that are less constrained by future generation requirements and “free” power from ramping generators.

Fig. 2 shows 1, 2, and 3 degree polynomial fits of the marginal cost to the demand, with their adjusted R-squared

Figure

Fig. 1. Histogram of the frequency of demand-marginal cost pairs (counts) at the PJM scale. Marginal cost and demand are highly positively correlated. All rows and columns have at most 3 adjacent nonzero boxes, most have 2. This shows that outliers do not deviate much.

Rˉ2\bar{R}^2. The ≈2×\approx 2\times difference between minimum and maximum demand to ≈8×\approx 8\times difference between minimum and maximum marginal cost further motivates a cubic fit. A 4th degree increased Rˉ2\bar{R}^2 less than 0.1% and made no visual difference.

Figure

Fig. 2. Polynomial fits of marginal cost as a function of demand. Marginal cost and demand are highly positively correlated, with a few outliers. The degree 3 polynomial has the largest adjusted R-squared (Rˉ2\bar{R}^2) and is visually most similar to the data. The relative scale of the axes also suggests a cubic fit. The linear term is always dominant and positive. This suggests it is almost always better to shift net demand from high demand periods to low demand periods with hydropower or storage.

The linear term is dominant in all the fits shown here. The linear term of the 4 degree fit has a non-dominant negative coefficient, a clear sign of over-fitting, based on visual inspection of the data.

This fit motivates the heuristic of using hydropower to prefer reducing demand from high demand periods over low demand periods. This is also known as load flattening or peak shaving. It also shows that even if pumped storage (or any other battery) does not retain energy perfectly, i.e. it can discharge a smaller amount than it charges, it can still be well worth-while to shift demand from low to high demand periods.

We define the demand remaining after hydro-generator commitment at time t optimized over T time periods as Dˉt=Dt−∑i=1nui,tκi\bar{D}_{t}=D_{t}-\sum_{i=1}^{n}u_{i,t}\kappa_{i}, where κi\kappa_{i} is the power hydro-generator i can produce. Smoothing out Dˉt\bar{D}_{t} will lead to lower overall costs, because the marginal cost is highest when demand is highest. This leads to the following optimization problem:

min⁡ui,tVar(Dt−∑i=1nui,tκi)s.t.∀1≤i≤n:∑t=1Tui,t=πi,ui,t∈{0,1}(2)\begin{aligned}\min_{u_{i,t}}\quad&Var\left(D_{t}-\sum_{i=1}^{n}u_{i,t}\kappa_{i}\right)\\ s.t.\quad&\forall1\leq i\leq n:\sum_{t=1}^{T}u_{i,t}=\pi_{i},u_{i,t}\in\{0,1\}\end{aligned} \tag{2}

In a production setting, one would supplement this solve with a fast full ACOPF solve [11], which could potentially change the commitments of the hydro units. This could be combined with new rainfall forecasts. Solving Eq. (2) exactly

Algorithm 1 Demand Balancing

Require: Capacities κi\kappa_i, maximum operating periods πi\pi_i for i=1,…,ni = 1, \ldots, n; demands dtd_t for t=1,…,Tt = 1, \ldots, T

1: Gt←0G_t \leftarrow 0 ∀t\forall t ▹\triangleright Generated hydro-power at period tt

2: Initialize indexed max-heap HH with keys kt=Dtk_t = D_t

3: used t←0_t \leftarrow 0 ∀t\forall t ▹\triangleright Tracks assignments

4: Re-index such that κ1π1≥…κnπn\kappa_1 \sqrt{\pi_1} \geq \ldots \kappa_n \sqrt{\pi_n} ▹\triangleright Improves numerical stability

5: for j←1j \leftarrow 1 to nn do

6: placed ←0\leftarrow 0

7: while placed < πi\pi_i do

8: τ←arg⁡max⁡tkt\tau \leftarrow \arg\max_t k_t

9: if used r=j_r = j then

10: Set kτ←∞k_\tau \leftarrow \infty and update HH

11: else

12: used r←j_r \leftarrow j

13: placed ←\leftarrow placed + 1,

14: Gτ←Gτ+κiG_\tau \leftarrow G_\tau + \kappa_i

15: Update kτ←Dτ−Gτk_\tau \leftarrow D_\tau - G_\tau in HH

16: end if

17: end while

18: for t←1t \leftarrow 1 to TT do

19: if kt=∞k_t = \infty then

20: Update kt←Dt−Gtk_t \leftarrow D_t - G_t in HH

21: end if

22: end for

23: end for

24: return (Lt),(Dt−Gt),Var(Dt−Gt)(L_t), (D_t - G_t), \text{Var}(D_t - G_t)

is NP-hard (see Theorem 2 in Appendix B). Algorithm 1 approximates a solution by “greedily” assigning a generator which still has remaining periods to the period with the highest remaining demand. This is equivalent to locally optimizing Eq. (2). Algorithm 1 runs in log-linear time (see Theorem 3 in Appendix B).