TangentGeom struct
#include <gtopt/line_losses.hpp>
Geometry of one tangent line in the outer-approximation PWL formulation (layout = tangent). Tangent k touches the convex quadratic ℓ(f) = (R/V²)·f² at touch_point = t_k and forms the LP inequality
loss ≥ slope_coef · |f| + intercept_coef (pre-`R/V²`)
i.e. loss ≥ R/V² · (2·t_k · |f| − t_k²).
Fields are the GEOMETRIC pre-R/V² values, so unit tests can validate the curve math independently of any specific line's resistance / voltage. add_tangents multiplies both by R/V² (and by loss_row_scale) when stamping rows.
Public variables
- double intercept_coef
- -t_k² (pre-R/V²); intercept in
loss ≥ … - double slope_coef
- 2 · t_k (pre-R/V²); coef on |f| in
loss ≥ … - double touch_point
- t_k where the tangent meets the curve