Reinforcement learning for multi-objective reservoir control. A custom Gymnasium environment simulates one water reservoir over a 365-day year under three competing objectives — flood protection, water supply, and ecological minimum flow. PPO agents (Stable-Baselines3) trained under different objective weightings trace a Pareto trade-off frontier, compared honestly against a conventional rule-curve operating policy. The point is the problem formulation and the trade-off analysis, not the learning algorithm.
The balanced agent fills through spring, holds, and draws the reservoir down through summer to meet demand — one learned year of operation.
Each point is one trained policy in objective space (lower is better on every axis). Raising a weight lowers that objective's penalty at the expense of the others; the rule-based baseline (red star) is marked for comparison.
Balanced RL agent vs. the rule-based baseline, mean over 100 evaluation episodes (lower is better on all three):
| Objective | Balanced RL | Rule-based |
|---|---|---|
| Flood penalty | 1.7 | 82.4 |
| Supply deficit | 183.4 | 194.7 |
| Ecological deficit | 22.2 | 0.0 |
Every learned agent beats the rule on flood penalty and most beat it on supply, but the rule
stays on the Pareto frontier because it enforces the ecological minimum as a hard floor
(zero deficit) while PPO treats it as a soft penalty. See
experiments/pareto_experiment.md for the full analysis.
make setup # install dependencies (uv)
make test # run the test suite
make baseline # evaluate the rule-based policy → trajectory.png
make train # train one balanced PPO agent → learning_curve.png
make experiment # full Pareto sweep across weight sets → pareto_frontier.png
make figures # rebuild all figures from saved results, no retrainingEnvironment. Each day, the agent observes normalized storage, inflow, a cyclical day-of-year encoding, and a noisy inflow forecast, and chooses a release. A daily mass balance updates storage; water above capacity spills as uncontrolled overflow. Inflow peaks in spring and demand in summer, so the reservoir must store spring water for summer demand.
Reward. A weighted sum of three squared, scale-normalized penalties — flood (overflow and excessive release), supply (unmet demand), and ecology (release below the minimum flow). The raw per-objective penalties are recorded separately; the Pareto analysis uses those, never the scalarized reward.
Agent. PPO (Stable-Baselines3) with default hyperparameters, one agent per weight set, 150k steps on CPU. The environment was deliberately sized (large capacity, release capped just above peak demand, long discount horizon) so that managing storage actually matters — see the writeup for why the naive parameters gave a degenerate frontier.
This is a simplified formulation of the multi-objective reservoir-control problem studied at Politecnico di Milano's Environmental Intelligence lab (Castelletti, Giuliani) in collaboration with the RL3 group (Restelli, Metelli), where RL-based release policies have been shown to outperform static rule curves under non-stationary inflow conditions.
- Single reservoir. Real systems are cascaded networks of reservoirs.
- Scalarized, not true MORL. The frontier is traced by repeated weighted runs; Pareto-Q or envelope methods would learn it in a single run.
- Ecology as soft penalty. The minimum flow is a tunable penalty, not a hard constraint; constrained RL would enforce it directly.
- Synthetic inflows. Inflow and demand are synthetic seasonal signals, not gauged data.
- One seed per weight set, and the environment required calibration to expose the trade-off.
- Castelletti, A., Pianosi, F., & Restelli, M. (2013). A multiobjective reinforcement learning approach to water resources systems operation. Water Resources Research, 49(6).
- Giuliani, M., Castelletti, A., Pianosi, F., Mason, E., & Reed, P. M. (2016). Curses, tradeoffs, and scalable management. J. Water Resources Planning and Management, 142(2).
- Raffin, A. et al. (2021). Stable-Baselines3: Reliable RL implementations. JMLR, 22(268).
- Schulman, J. et al. (2017). Proximal Policy Optimization Algorithms. arXiv:1707.06347.
- Sutton, R. S., & Barto, A. G. (2018). Reinforcement Learning: An Introduction (2nd ed.).

