gtopt/line_commitment_lp.hpp file

LP formulation for Optimal Transmission Switching (issue #509).

Defines LineCommitmentLP — the LP-build companion to the LineCommitment JSON element. For every block of every active (scenario, stage) the class:

  1. Creates a binary u_l ∈ {0, 1} status column (relaxable to [0, 1] via LineCommitment.relax).
  2. Stamps capacity gating rows so u_l = 0 forces f_l = 0:
    • direction (A → B): f - F^max_ab · u_l ≤ 0 − direction (B → A): F^max_ba · u_l + f ≥ 0

    (rows scale to the per-block tmax_ab / tmax_ba schedule; transparent to whether the underlying flow column is signed — tangent_signed_flow — or split into fp / fn).

v1 scope (issue #509 §"Implementation roadmap"):

  • Capacity gating — always emitted (transport + Kirchhoff).
  • node_angle KVL big-M disjunction — emitted by this class: the per-line KVL equality row stamped by LineLP is rewritten in place as an upper-side ≤ inequality and a new lower-side ≥ row is added, so u_l = 0 decouples θ_a from θ_b exactly like an opened breaker.
  • cycle_basis KVL big-M disjunction — emitted by kirchhoff::cycle_basis::add_kvl_rows (system-level assembler). Each cycle row containing a switchable line is replaced by two inequalities with per-cycle big-M M_C = 2·θ_max · |C| · row_scale + Σ |φ_e| · row_scale.

v1.2 scope additions (mirroring CommitmentLP):

  • min_up_time [hours] — anti-flicker: Σ_{q ∈ window} u[q] ≥ UT · v[t], where UT is the smallest block-window covering min_up_time hours. Trivially satisfied (skipped) when UT ≤ 1. Requires u/v/w (silently inert otherwise).
  • min_down_time [hours] — symmetric down-time guard.
  • max_starts / min_starts — two-sided rolling cap on Σ_{t ∈ window} v[t]. Window length resolved from starts_scope via starts_window_hours().

v1.3 scope additions (also mirroring CommitmentLP):

  • Startup tiers (hot/warm/cold) — when all five tier fields are set together with u/v/w, the flat startup_cost on v[t] is zeroed and three tier indicators y^hot, y^warm, y^cold ∈ [0, 1] are emitted per block, joined by C8: v[t] = y^hot[t] + y^warm[t] + y^cold[t] C9: y^hot[t] ≤ Σ_{q ∈ hot window} w[q] C10: y^warm[t] ≤ Σ_{q ∈ warm window} w[q] where the windows look BACKWARDS by cumulative block duration: hot ⇒ sum ≤ hot_start_time; warm ⇒ sum ∈ (hot_start_time, cold_start_time]. Cold is residual. Pre-stage offline-time is supplied via initial_hours.

Mode gates (enforced by validate_planning):

  • method ∈ {sddp, cascade} is rejected — Benders cuts on a mixed-integer subproblem are unsound (Zou-Ahmed-Sun 2019).
  • Both Kirchhoff modes (node_angle, cycle_basis) and transport mode (use_kirchhoff = false) are now supported.

Namespaces

namespace gtopt

Classes

class gtopt::LineCommitmentLP