Reservoir scheduling as a constrained problem
A reservoir schedule decides how much water to release in each period of a planning horizon. The decision variables are the releases (or the end-of-period storages), the objective might be to maximise hydropower generation or minimise water-supply deficits, and the constraints come from physics and policy: the water balance linking storage, inflow, release and spill; minimum and maximum storage; release limits set by turbines and outlets; minimum environmental flows; and a target storage at the end of the horizon. Multi-reservoir systems couple these constraints across sites, as in the studies of multi-reservoir operation for environmental water demand (Mao et al., 2016) and joint scheduling in complex river networks (Liu et al., 2017).
The result is a non-linear problem with many variables and a feasible region that can be narrow. Derivative-based methods struggle when the objective is non-smooth, for example when generation depends on turbine tables, so population-based global optimisers are widely used. Most of them, including SCE, were designed for problems with simple bounds; they need a separate method for general constraints (Hellwig & Beyer, 2019).
Shuffled complex evolution (SCE-UA)
SCE-UA was developed at the University of Arizona to calibrate conceptual rainfall-runoff models (Duan et al., 1992). Duan et al. (1993) describe it as combining deterministic and probabilistic search, clustering into complexes, systematic evolution of each complex and competitive evolution, and tested it against controlled random search and multistart simplex methods. The search inside each complex uses reflection and contraction steps from the Nelder-Mead simplex method (Nelder & Mead, 1965). Three decades of extensions and applications are reviewed by Rahnamay Naeini et al. (2019).
- Sample s points in the feasible bounds and evaluate them. With p complexes of m points, s = p × m.
- Rank the points from best to worst and deal them into p complexes, like cards, so each complex spans the range of quality.
- Evolve each complex with the competitive complex evolution (CCE) routine: choose q points as a sub-complex, with better-ranked points more likely to be chosen; compute the centroid of all but the worst; reflect the worst point through the centroid; if the new point is infeasible or no better, try a contraction; if that fails, replace the worst point with a random point. Repeat this α times per sub-complex and β times per complex.
- Shuffle: merge the complexes, re-rank and re-partition, so information passes between complexes.
- Stop when the population has converged or a budget of function evaluations is reached.
The selection probability gives the point ranked i among m a probability of 2(m + 1 − i) / [m(m + 1)], decreasing linearly from best to worst. Note that steps 1 and 3 only respect the variable bounds. A release schedule that breaks the water balance or the environmental flow is still "feasible" to SCE unless a constraint method is added.
Stochastic ranking
Stochastic ranking was proposed by Runarsson and Yao (2000) as a way to rank a population when both the objective and the total constraint violation matter, without choosing a penalty weight. It works like a bubble sort. In each sweep through the population, adjacent individuals are compared: if both are feasible, or with probability Pf, they are compared by objective value; otherwise they are compared by constraint violation. Sweeps repeat until no swaps occur or a set number is reached.
The probability Pf controls the balance. With Pf = 0 the ranking is driven entirely by violation until individuals are feasible; with Pf = 0.5 objective and violation have equal say. A value a little below 0.5, such as 0.45, keeps some pressure towards feasibility while letting promising infeasible points survive near the boundary, where reservoir optima often lie.
Combining them: SCE-SR
The combination is simple in principle: wherever SCE ranks or compares points, use stochastic ranking instead of the objective alone. That applies to the initial ranking and partition, to the ranking inside each sub-complex (which decides the worst point and the centroid) and to the acceptance test after reflection or contraction. The constraint violation is usually the sum of normalised violations of each constraint, so that a breach of the storage limit and a breach of the environmental flow are on comparable scales.

- 1Sample s points within bounds
- 2Evaluate objective and constraint violation
- 3Rank by stochastic ranking
- 4Partition into p complexes
- 5Evolve each complex (CCE with stochastic ranking)
- 6Shuffle complexes
- 7Converged? Stop or repeat
| Parameter | Meaning | Commonly used value |
|---|---|---|
| n | Number of decision variables | Set by the problem |
| m | Points per complex | 2n + 1 |
| q | Points per sub-complex | n + 1 |
| α | Offspring per sub-complex | 1 |
| β | Evolution steps per complex before shuffling | 2n + 1 |
| p | Number of complexes | Chosen by the user; more complexes search more widely at greater cost |
| Pf | Probability of comparing by objective | Just below 0.5, e.g. 0.45 |
Default values from Duan et al. (1994) are a starting point, not a result. Report the values you used and test sensitivity to p and Pf in particular.
Worked example (illustrative)
Consider a single reservoir scheduled monthly for one year to maximise hydropower subject to storage bounds, turbine limits, a minimum environmental flow and an end-of-year storage target. The decision variables are twelve releases, so n = 12, giving m = 25, q = 13 and β = 25. With p = 4 complexes the population is 100 points. Each candidate schedule is simulated through the water balance to obtain storages, generation and the violation of each constraint, normalised by its permitted range. Stochastic ranking with Pf = 0.45 orders the population, and the algorithm runs until improvement stalls or 50,000 evaluations are used. The researcher then repeats the run 30 times with different seeds and compares the distribution of final generation with a penalty-based SCE and a standard evolutionary algorithm.
Benchmarking and reporting
No optimiser is best on every problem (Wolpert & Macready, 1997), so a thesis must show that SCE-SR suits the problem at hand. Compare it with established methods on the same evaluation budget, over many independent runs, and use non-parametric tests to compare the results (Derrac et al., 2011). For constrained problems, report the proportion of runs that end feasible as well as the objective, since benchmarking practice for constrained optimisation has been criticised for weak and inconsistent reporting (Hellwig & Beyer, 2019). Justify the method by its mechanism rather than by a metaphor (Aranha et al., 2022), and share code, seeds and data so the results can be reproduced (Sandve et al., 2013). See choosing and benchmarking a metaheuristic and presenting code in a thesis.
SCE variants have also been used beyond hydrology, for example to extract solar cell model parameters (Gao et al., 2018).
Common mistakes
- Applying SCE to a constrained schedule without any constraint-handling method.
- Adding violations measured in different units without normalising them.
- Reporting one run, or the best of many runs, instead of the distribution.
- Comparing algorithms on different evaluation budgets.
- Copying default parameters without testing sensitivity.
- Describing results from another study without citing it.
Key takeaways
- Reservoir scheduling is a constrained optimisation problem, and SCE handles only bounds unless a constraint method is added (Duan et al., 1993; Hellwig & Beyer, 2019).
- SCE evolves ranked complexes with simplex-based steps and shuffles them to share information (Duan et al., 1992; Nelder & Mead, 1965).
- Stochastic ranking compares solutions by objective or by violation with a set probability, avoiding penalty weights (Runarsson & Yao, 2000).
- Default parameters are a starting point; report and test them (Duan et al., 1994).
- Benchmark over many runs with non-parametric tests and share code for reproducibility (Derrac et al., 2011; Sandve et al., 2013).
