BlockResult struct
#include <gtopt/line_losses.hpp>
LP indices produced by add_block() for one block.
Public variables
- std::optional<RowIndex> capn_row
- std::optional<RowIndex> capp_row
- A→B capacity constraint.
- std::optional<ColIndex> f_abs_col
- std::optional<ColIndex> flow_col
- std::optional<ColIndex> fn_col
- double fn_loss
- std::optional<ColIndex> fp_col
- A→B flow column (aggregator).
- double fp_loss
- std::optional<ColIndex> lossn_col
- B→A loss column (PWL modes).
- std::optional<ColIndex> lossp_col
- A→B loss column (PWL modes).
- std::vector<ColIndex> seg_n_cols
- std::vector<double> seg_n_loss
- std::vector<ColIndex> seg_p_cols
- std::vector<double> seg_p_loss
- std::optional<RowIndex> thermaln_row
- std::optional<RowIndex> thermalp_row
Variable documentation
std::optional<ColIndex> gtopt:: line_losses:: BlockResult:: f_abs_col
Auxiliary |f|-envelope column used by tangent_signed_flow to tighten the loss upper bound from the loose constant R·fmax²/V² to the linear-in-|f| chord (R·fmax/V²) · v (with v ≥ |f|). Internal to the loss model — KVL / bus balance do NOT stamp it.
std::optional<ColIndex> gtopt:: line_losses:: BlockResult:: flow_col
Single SIGNED flow column used by tangent_signed_flow mode (Coffrin outer approximation; no fp/fn decomposition). When populated, fp_col / fn_col are empty and KVL stamps +x_τ on flow_col directly (sign comes from f itself). Combined with lossp_col (a single quadratic-upper-bounded loss column).
double gtopt:: line_losses:: BlockResult:: fp_loss
Per-direction LINEAR loss factor stamped on fp_col / fn_col (config.lossfactor). Non-zero ONLY under LineLossesMode:: linear, where the line's loss is fp_loss · primal(fp_col) + fn_loss · primal(fn_col) — there is no explicit loss column or per-segment col in that mode. Default 0 for every other mode (their loss is carried by lossp_col / lossn_col or the seg_*_loss vectors instead).
std::vector<ColIndex> gtopt:: line_losses:: BlockResult:: seg_n_cols
Per-segment columns for the B→A direction. Same semantics as seg_p_cols; KVL stamps each with −x_τ.
std::vector<double> gtopt:: line_losses:: BlockResult:: seg_n_loss
Per-segment physical loss factor lf_k for the B→A direction, parallel to seg_n_cols. Same semantics as seg_p_loss.
std::vector<ColIndex> gtopt:: line_losses:: BlockResult:: seg_p_cols
Per-segment columns for the A→B direction. Populated only by piecewise_direct mode, which has no aggregator (fp_col is empty). Each segment carries its own bus-balance stamp with the per-segment loss factor; the Kirchhoff (KVL) row sums them with +x_τ per segment to recover x_τ · f_p.
std::vector<double> gtopt:: line_losses:: BlockResult:: seg_p_loss
Per-segment physical loss factor lf_k for the A→B direction, parallel to seg_p_cols (same length / order). Populated only by piecewise_direct mode. lf_k is the exact coefficient stamped into the bus-balance rows for segment k (seg_width · R · (2k−1) / V²), so the LP-consistent A→B loss is Σ_k seg_p_loss[k] · primal(seg_p_cols[k]) in physical MW — there is NO extra column scale on this coefficient in direct mode.
std::optional<RowIndex> gtopt:: line_losses:: BlockResult:: thermalp_row
Thermal-limit rows f_dir + a·ℓ_dir ≤ T_dir added under LineThermalLimitMode::sending / full (A→B / B→A). Empty under flow, for lossless lines, when the coefficient a is 0 or when T_dir is not finite. linear mode never adds a row: it tightens the flow-column bound to T_dir / (1 + a·λ) instead.