parasolpy.reservoir
Reservoir sizing via the sequent peak algorithm.
Functions
|
Compute required reservoir storage using the sequent peak algorithm. |
- parasolpy.reservoir.sequent_peak(inflow, demand)[source]
Compute required reservoir storage using the sequent peak algorithm.
Given a time series of inflows and a constant demand, returns the minimum storage required at each timestep to meet demand without deficit.
- Parameters:
inflow – Array-like of inflow values, one per timestep (same units as demand).
demand – Constant demand value per timestep.
- Returns:
Required storage (K) at each timestep. K[t] = 0 means no storage deficit; positive values indicate cumulative shortage.
- Return type:
numpy.ndarray