Skip to main content

Module lbfgs

Module lbfgs 

Source
Expand description

Limited-memory Powell-damped BFGS Hessian approximation for SQP (Nocedal-Wright §7.2; Byrd-Nocedal-Schnabel 1994; Powell 1978). Used when SqpOptions::hessian = Lbfgs.

Maintains a fixed-length circular buffer of (s, y) pairs and, at each as_triplet query, reconstructs the dense Hessian B_k by replaying the rank-2 BFGS updates from a scaled-identity seed B_0 = γ_k I with γ_k = (s_{last}·y_{last}) / (y_{last}·y_{last}) (Nocedal-Wright eq. 7.20 — the standard initial-scaling heuristic).

Phase 5b commit 15 implements the dense materialization path (output is a full upper-triangular Triplet consumed by pounce-qp’s SqpQpData). A future commit can add a matrix-free product interface so the QP can avoid the O(n²) storage when m_history ≪ n.

Powell damping is identical to crate::sqp::bfgs::DampedBfgs:

    if s·y ≥ 0.2 · s·B s :  θ = 1
    else                  :  θ = 0.8 · s·B s / (s·B s − s·y)
    y_damp = θ y + (1 − θ) B s

…but B here is the rebuilt one, accumulated within materialize, so the damping factor for each historical pair is computed at replay time against the running B (matching how a full BFGS would have evolved).

Structs§

LBfgs
Limited-memory Powell-damped BFGS, storing up to m_history most-recent (s, y) pairs.