Inflow Non-Negativity
Overview
The PAR(p) autoregressive model generates inflow realizations by adding a random innovation to a weighted combination of past inflows. Because the innovation term can be arbitrarily negative in the Gaussian model, the total inflow can sometimes be negative — which is physically impossible. Negative inflows would cause the water balance to add water to the reservoir rather than drain it, producing absurd dispatch decisions.
Handling this situation correctly is important for both LP feasibility and for maintaining the statistical properties of the inflow model. Three strategies are available, with different trade-offs between model fidelity, LP complexity, and computational cost.
How Negative Inflows Arise
The PAR(p) model at stage for hydro generates:
When the noise realization is sufficiently negative (e.g., ), the total can become negative. For systems with low seasonal mean flows and high variability, this can occur with non-negligible probability in dry seasons.
If enters the water balance constraint uncorrected, the LP solver treats it as a negative inflow (water added to the river system), which has no physical meaning and will cause the optimizer to mismanage reservoir storage.
The Penalty Method (Recommended)
The recommended approach introduces a non-negative slack variable that absorbs any negative inflow, keeping the effective inflow non-negative while preserving the LP formulation and the AR model structure for positive realizations.
Modified AR constraint:
with . When is mild, the optimizer sets and takes its natural value. When is extreme, absorbs the excess, so the effective inflow:
The violation is penalized in the objective outside the block summation:
where is the total stage duration in hours. The factor converts the slack rate (m³/s) to an equivalent energy dimension over the full stage, making the penalty dimensionally consistent with storage violation penalties that appear in the same part of the objective.
The penalty is a Category 2 constraint violation penalty — it sits above generation costs in the penalty hierarchy, ensuring the optimizer “pays” for negative inflow events in the value function and propagates this signal back through the Benders cuts.
Properties
- LP always feasible: the slack prevents infeasibility for any noise realization
- AR dynamics preserved for positive realizations: when , the model is unchanged
- Clear cost signal: the penalty magnitude tracks how frequently and severely the threshold is violated
Truncation (Simple Alternative)
The simplest method truncates negative inflows to zero before they enter the LP:
No additional LP variables or constraints are needed. However, truncation has two statistical drawbacks: it shifts the mean inflow upward (positive bias) and disrupts temporal correlation at truncation events, because the extreme noise that triggered truncation is discarded rather than tracked.
For quick studies or debugging, truncation is acceptable. For production use, the bias can distort long-run cost estimates in drought scenarios.
Deferred: Truncation with Penalty
A more sophisticated hybrid approach (deferred to post-v0.1.0) combines truncation with explicit noise adjustment tracking. It introduces a dimensionless slack that adjusts the noise term rather than the inflow directly:
The penalty is proportional to the actual inflow correction , which is larger in high-variability seasons. This approach preserves AR model structure better than pure truncation and provides a more precise signal of how much the noise realization was adjusted. It is deferred because the interaction with the noise generation pipeline adds complexity that is not needed for the minimal viable solver.
Summary
| Method | LP Size | Bias | AR Preservation | Recommended |
|---|---|---|---|---|
| No handling | Base | None | Full | Debugging only |
| Penalty | +1 var/constraint per hydro | Minimal | Full | Production |
| Truncation | Base | Upward | Partial | Quick studies |
| Truncation with penalty | +vars | Minimal | Full | Post-v0.1.0 |
Further Reading
- PAR(p) Autoregressive Models — the inflow model that generates the realizations handled here
- Inflow Non-Negativity (spec) — complete formal specification including the full LP formulations for all four methods and penalty hierarchy placement
- LP Formulation (spec) — penalty taxonomy and priority ordering