gtopt::StoredCut struct

A serialisable representation of a Benders cut.

Public functions

auto key() const -> CutKey noexcept
Build a :type:CutKey from this cut's identifying fields.

Public variables

std::vector<std::pair<ColIndex, double>> coefficients
Coefficient pairs: (column_index, coefficient).
int extra
IterationIndex iteration_index
PhaseUid phase_uid
Phase UID this cut was added to.
ColIndex pivot_col
double rhs
Right-hand side (lower bound).
RowIndex row
double scale
Row scale (physical → LP), mirrors SparseRow::scale.
SceneUid scene_uid
CutType type

Variable documentation

int gtopt::StoredCut::extra

4th element of :type:IterationContext — a free int discriminator that disambiguates multi-cut siblings (forward pass under multi_cut mode emits N feasibility cuts per (scene, phase) cell per iter; they share everything except this offset). Sentinel -1 = "no source context was attached at store time"; matches :member:CutKey::extra default and round-trips unchanged.

IterationIndex gtopt::StoredCut::iteration_index

SDDP iteration index at which this cut was generated. Populated from the source SparseRow's :type:IterationContext at store time. Authoritative for all consumers that previously parsed the cut name (which has been removed).

ColIndex gtopt::StoredCut::pivot_col

Pivot column for compose_physical normalization. Preserves the alpha-column normalization used when the cut was first built, so that shared cuts replayed into other scenes use the same floating-point rounding as local cuts.

RowIndex gtopt::StoredCut::row

LP row index where this cut was added

SceneUid gtopt::StoredCut::scene_uid

Scene UID that generated this cut (-1 = shared)