Skip to content

Inflow Non-Negativity Solution Methods

This chapter defines the four methods available for handling negative inflow realizations produced by the PAR(p) model, including their LP formulations, objective function modifications, and trade-offs.

The PAR(p) model’s inflow equation — using the AR coefficient ψm,ℓ\psi_{m,\ell} — can produce a negative realization:

ah=bh,m⏟deterministic base+∑ℓ=1pψm,ℓ⋅a^h,ℓ⏟lag contribution+σm⋅ε⏟noise terma_h = \underbrace{b_{h,m}}_{\text{deterministic base}} + \underbrace{\sum_{\ell=1}^{p} \psi_{m,\ell} \cdot \hat{a}_{h,\ell}}_{\text{lag contribution}} + \underbrace{\sigma_m \cdot \varepsilon}_{\text{noise term}}

When the innovation ε\varepsilon is sufficiently negative (e.g., ε<−2\varepsilon < -2), the total can become negative. That is not itself a physical impossibility: aha_h is incremental inflow — a plant’s natural flow minus its upstream plants’ — so a genuinely negative value is real hydrology (a reach that loses water over the period), and the same ah<0a_h < 0 case arises whether the realization comes from PAR(p) noise or from replaying a negative window of historical/observed data directly (inflow_history/recent_observations; see PAR(p) Inflow Model). What the methods below solve is the LP’s water-balance consequence of ah<0a_h < 0: absorbing it without the other water-balance variables (storage, release, spillage — all bounded ≥0\geq 0) being driven infeasible.

The inflow non-negativity penalty chinfc^{inf}_h prices a Category 1 recourse slack (Penalty System — Category 1): the slack adds water to the hydro’s water balance, so every subproblem stays feasible when a negative inflow realization leaves the balance without a solution. Its cost is ordered with the constraint-violation penalties: converted to an energy-equivalent cost in $/MWh, it lies above the thermal and contract costs and below deficit (Penalty System — Penalty Priority Ordering).

Since inflow aha_h is defined per stage (not per block), the inflow non-negativity penalty appears outside the block summation in the objective, alongside storage violation penalties:

+∑h∈Hchinf⋅σhinf⋅Ht+ \sum_{h \in \mathcal{H}} c^{inf}_h \cdot \sigma^{inf}_h \cdot H_t

where Ht=∑kτkH_t = \sum_k \tau_k is the total stage duration in hours. The product σhinf⋅Ht\sigma^{inf}_h \cdot H_t is the volume of water the slack adds, in (m³/s)·h, so chinfc^{inf}_h is a cost per (m³/s)·h of added water.

LP Formulation: Standard AR constraint (unchanged):

ah=bh,m+∑ℓ=1pψm,ℓ⋅ah,ℓ+σm⋅εa_h = b_{h,m} + \sum_{\ell=1}^{p} \psi_{m,\ell} \cdot a_{h,\ell} + \sigma_m \cdot \varepsilon

Implications:

  • LP may become infeasible when ah<0a_h < 0 causes water balance violation
  • Useful only for debugging or when the AR model guarantees positive outputs

Additional Variables:

VariableDomainUnitsDescription
σhinf\sigma^{inf}_h≥0\geq 0m³/sInflow non-negativity slack

Water-balance term: the slack enters the hydro’s water balance beside the realized inflow, every term on the left-hand side (LP Formulation §4):

−ζ (ah+σhinf)    (parallel stage),−ζk (ah+σhinf)    (block k of a chronological stage)-\zeta \,\big( a_h + \sigma^{inf}_h \big) \;\; \text{(parallel stage)}, \qquad -\zeta_k \,\big( a_h + \sigma^{inf}_h \big) \;\; \text{(block } k \text{ of a chronological stage)}

so the slack adds ζ σhinf\zeta\,\sigma^{inf}_h hm³ of water over the stage, ζk σhinf\zeta_k\,\sigma^{inf}_h in block kk. The realized-inflow row (LP Formulation §5) is unchanged: the AR equation keeps the realization aha_h. A PreFilling hydro’s frozen identity row carries no slack. Interpretation: the water reaching the reservoir is aheffective=ah+σhinfa_h^{effective} = a_h + \sigma^{inf}_h. The LP uses the slack whenever the water balance cannot be met otherwise, or whenever the added water is worth more than its cost; nothing ties it to the sign of the realization.

Objective Function Addition (outside block summation):

+∑h∈Hchinf⋅σhinf⋅Ht+ \sum_{h \in \mathcal{H}} c^{inf}_h \cdot \sigma^{inf}_h \cdot H_t

where chinfc^{inf}_h is the penalty cost of hydro hh and Ht=∑kτkH_t = \sum_k \tau_k is the total stage duration in hours.

Advantages:

  • LP always feasible
  • Clear cost signal for negative inflow events
  • Preserves AR dynamics for positive realizations

Disadvantages:

  • Adds one slack column per hydro
  • Slightly affects marginal water values

Scenario Generation:

ah=max⁡(0,bh,m+∑ℓ=1pψm,ℓ⋅a^h,ℓ+σm⋅ε)a_h = \max\left(0, b_{h,m} + \sum_{\ell=1}^{p} \psi_{m,\ell} \cdot \hat{a}_{h,\ell} + \sigma_m \cdot \varepsilon\right)

LP Formulation: Standard AR constraint with the already-truncated aha_h value:

ah=(truncated value from scenario)a_h = \text{(truncated value from scenario)}

Advantages:

  • No additional LP variables or constraints
  • Straightforward formulation

Disadvantages:

  • Biases the distribution: Shifts mean upward
  • Breaks AR dynamics: When truncation occurs, temporal correlation is disrupted
  • May affect long-term storage dynamics

6. Method: truncation_with_penalty — Hybrid Design

Section titled “6. Method: truncation_with_penalty — Hybrid Design”

The two preceding methods each handle one side of the problem well but leave the other unaddressed: pure truncation keeps the LP lean but biases the inflow distribution upward; pure penalty preserves distribution fidelity but relies entirely on LP slack to absorb every negative excursion. The hybrid combines both mechanisms to cover the full range of noise excursions efficiently.

6.1 Formulation: clamp outside the LP, slack inside the LP

Section titled “6.1 Formulation: clamp outside the LP, slack inside the LP”

The PAR(p) noise is clamped outside the LP before the scenario is patched in, exactly as in the truncation method:

ah=max⁡(0,bh,m+∑ℓ=1pψm,ℓ⋅a^h,ℓ+σm⋅ε)a_h = \max\left(0, b_{h,m} + \sum_{\ell=1}^{p} \psi_{m,\ell} \cdot \hat{a}_{h,\ell} + \sigma_m \cdot \varepsilon\right)

Inside the LP, penalty slack columns σhinf\sigma^{inf}_h are added to the water-balance constraint, exactly as in the penalty method:

Additional Variables:

VariableDomainUnitsDescription
σhinf\sigma^{inf}_h≥0\geq 0m³/sInflow non-negativity slack

Water-balance term: as in §4, with the clamped aha_h on the realized-inflow row.

Objective Function Addition (outside block summation):

+∑h∈Hchinf⋅σhinf⋅Ht+ \sum_{h \in \mathcal{H}} c^{inf}_h \cdot \sigma^{inf}_h \cdot H_t

Clamping and slack columns serve complementary roles that together preserve relatively complete recourse:

  • Clamping handles the common case cheaply. Most negative excursions are small — the noise term dips slightly below zero for a handful of stages in a scenario tree. Clamping those excursions to zero outside the LP adds no LP variables and no solver work. The inflow handed to the LP is always non-negative, so the water-balance constraint is never violated by the noise term alone.
  • Slack columns absorb rare large excursions without rejecting the scenario. When the PAR(p) model produces an extreme realisation, the deterministic base and lag contribution combined with the noise term can still yield a zero inflow after clamping, and the LP’s water-balance may still be infeasible without relief. The σhinf\sigma^{inf}_h slack column lets the solver add water to the stage’s balance at a known cost rather than declaring infeasibility. The stage is kept in the training set; the penalty signal propagates into future-cost cuts.
  • Together they guarantee LP feasibility (Category 1 recourse) across the full noise distribution, without biasing the distribution upward beyond what truncation already does for small excursions.

The literature formulates the same problem using a dimensionless noise-adjustment slack ξh\xi_h. This reference design is presented here so readers familiar with the Brazilian stochastic-dispatch literature can map between the two formulations.

Additional Variables:

VariableDomainUnitsDescription
ξh\xi_h≥0\geq 0-Noise adjustment slack (dimensionless)

Modified AR Constraint (two parts):

Part A — Modified noise term:

εhadj=εh+ξh\varepsilon_h^{adj} = \varepsilon_h + \xi_h

where εh\varepsilon_h is the original (possibly very negative) noise realization.

Part B — Inflow with adjusted noise:

ah=bh,m+∑ℓ=1pψm,ℓ⋅ah,ℓ+σm⋅εhadja_h = b_{h,m} + \sum_{\ell=1}^{p} \psi_{m,\ell} \cdot a_{h,\ell} + \sigma_m \cdot \varepsilon_h^{adj}

Non-negativity constraint:

ah≥0a_h \geq 0

Interpretation: The optimizer chooses ξh\xi_h to be the minimum adjustment needed to make ah≥0a_h \geq 0:

ξh=max⁡(0,−εh−bh,m+∑ℓψm,ℓ⋅a^h,ℓσm)\xi_h = \max\left(0, -\varepsilon_h - \frac{b_{h,m} + \sum_\ell \psi_{m,\ell} \cdot \hat{a}_{h,\ell}}{\sigma_m}\right)

Objective Function Addition (outside block summation):

+∑h∈Hchinf⋅σm⋅ξh⋅Ht+ \sum_{h \in \mathcal{H}} c^{inf}_h \cdot \sigma_m \cdot \xi_h \cdot H_t

The penalty is proportional to σm⋅ξh\sigma_m \cdot \xi_h, which is the actual inflow adjustment in m³/s. Note that σm\sigma_m varies by season, so the effective penalty for a given noise adjustment ξh\xi_h is larger in high-variability seasons and smaller in low-variability seasons. This is by design — a given noise adjustment represents a larger physical inflow correction when σm\sigma_m is large.

Relation to the clamp-plus-slack formulation: both price added water at chinfc^{inf}_h per (m³/s)·h, and they differ in two ways. The clamp-plus-slack formulation lifts a negative realization to zero outside the LP, at no cost, while the reference design pays for that lift through ξh\xi_h. And the reference design’s adjustment changes aha_h itself, which the AR lags of later stages carry, while the slack adds water beside an unchanged realized-inflow row, so the lags carry the clamped realization (the raw one under penalty). The clamp-plus-slack formulation adds no noise-adjustment constraint to the LP.

MethodLP SizeBiasAR PreservationFeasibility
noneBaseNoneFullMay fail
penalty+1 column per hydroMinimalFullGuaranteed
truncationBaseUpwardPartialGuaranteed
truncation_with_penalty+1 column per hydroUpwardPartialGuaranteed
  • LP Formulation — Objective function structure and penalty taxonomy, where chinfc^{inf}_h prices a Category 1 recourse slack
  • PAR(p) Inflow Model — Defines the PAR(p) model that produces the inflow realizations handled here
  • Penalty System — Penalty hierarchy and cascade resolution
  • Scenario Generation — The noise term ε\varepsilon in the inflow equation comes from the fixed opening tree (pre-generated noise vectors), not from per-iteration random sampling
  • Configuring inflow non-negativity — the software-layer setting that selects which of these four methods a study uses and where the penalty cost chinfc^{inf}_h is authored