gtopt/lp_equilibration.hpp file

Per-row equilibration primitives shared by the bulk LP build path and the post-build (cut) row-insertion path.

The bulk apply_row_max_equilibration / apply_ruiz_scaling routines in linear_problem.cpp scale the whole CSC matrix at once during LinearProblem::flatten(). After the LP has been built, any row added via LinearInterface::add_row (notably every SDDP Benders optimality cut) enters the matrix at its raw magnitude — bypassing the equilibration that normalised the structural rows. Over a hundred iterations this is a large source of kappa drift.

This header factors out the per-row math so the add_row path can apply exactly the same row_max or Ruiz-style scaling to each new cut as the original equilibration pass did to structural rows. The bulk routines are refactored internally to call these primitives so there is a single source of truth for the scaling math.

Namespaces

namespace gtopt