1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Inflow/stochastic-estimation cluster for the SDDP solver.
//!
//! This directory groups the preprocessing and hot-path machinery that turns
//! raw historical inflow data and per-stage noise samples into the PAR(p)
//! parameters, lag-accumulation state, and patched LP right-hand sides the
//! solver consumes.
//!
//! ## Contents
//!
//! - [`estimation`] — automatic PAR(p) parameter estimation from historical
//! inflow observations ([`EstimationPath`](estimation::EstimationPath),
//! [`estimate_from_history`](estimation::estimate_from_history)); bridges
//! `cobre-io` case loading and `cobre-stochastic` fitting.
//! - `noise` — the noise-transformation hot path
//! (`transform_inflow_noise`,
//! `transform_load_noise`) that writes patched
//! RHS values into the stage LP before each solve. Owns the NCS
//! availability-factor contract `A_r = max_gen · clamp(mean + std·η, 0, 1)`
//! (`transform_ncs_noise`,
//! `compute_effective_eta`).
//! - [`noise_key_diag`] — env-gated backward-pass diagnostic pairing a
//! σ-weighted aggregate noise key with per-opening warm-resolve pivot counts.
//! - [`lag_transition`] — precomputation of per-stage lag accumulation weights
//! and period-finalization flags
//! ([`precompute_stage_lag_transitions`](lag_transition::precompute_stage_lag_transitions)),
//! keeping calendar arithmetic out of inner solver loops.
//! - [`inflow_method`] — the closed
//! [`InflowNonNegativityMethod`](inflow_method::InflowNonNegativityMethod)
//! enum dispatched when handling negative PAR(p) realisations in the LP.
//! - `stochastic_summary` — the
//! [`StochasticSummary`](stochastic_summary::StochasticSummary) reporting
//! types and builder for the stochastic-preprocessing outcome.
// The noise hot path and the summary builder are pure intra-crate internals,
// never named from outside the crate, so their visibility stays `pub(crate)`.
pub
pub