dot-active_set_refine: Partition-Wise Active-Set Refinement for Inequality...

.active_set_refineR Documentation

Partition-Wise Active-Set Refinement for Inequality Constraints

Description

Replaces the dense .qp_refine SQP loop with a partition-wise active-set method that reuses the existing Lagrangian projection machinery. The key insight is that an active inequality constraint can be treated as an additional equality constraint and absorbed into the augmented constraint matrix \mathbf{A}_{\mathrm{aug}}, after which the standard \mathbf{G}^{1/2}\mathbf{r}^* trick applies without ever forming the full P \times P information matrix.

Usage

.active_set_refine(
  result,
  X,
  y,
  K,
  p_expansions,
  A,
  R_constraints,
  constraint_value_vectors,
  Lambda,
  Ghalf,
  GhalfInv,
  family,
  qp_Amat,
  qp_bvec,
  qp_meq,
  Xy_or_uncon,
  is_path3,
  parallel_aga,
  parallel_matmult,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks,
  tol,
  parallel_qr = FALSE,
  max_as_iter = NULL,
  initial_active_ineq = integer(0)
)

Arguments

result

List of current coefficient column vectors by partition.

X, y

Lists of partition-specific design matrices and responses.

K, p_expansions

Integer dimensions.

A

Original equality constraint matrix.

R_constraints

Number of columns of A.

constraint_value_vectors

Constraint RHS list.

Lambda

Shared penalty matrix.

Ghalf, GhalfInv

Lists of \mathbf{G}^{1/2}_k and \mathbf{G}^{-1/2}_k matrices.

family

GLM family object.

qp_Amat

Inequality constraint matrix.

qp_bvec

Inequality constraint RHS.

qp_meq

Number of equality constraints within qp_Amat (leading columns).

Xy_or_uncon

Cross-products (Path 2) or unconstrained estimates (Path 3).

is_path3

Logical.

parallel_aga, parallel_matmult

Logical flags.

cl, chunk_size, num_chunks, rem_chunks

Parallel parameters.

tol

Convergence tolerance.

max_as_iter

Maximum active-set iterations (default 50).

initial_active_ineq

Integer vector of inequality columns used as the initial working set.

Details

The active-set loop:

  1. Solve the equality-constrained subproblem (Lagrangian projection) with current active set.

  2. Check primal feasibility: any violated inactive inequalities?

  3. Check dual feasibility: any negative multipliers on active inequalities?

  4. If both satisfied, return (KKT conditions met).

  5. Otherwise, add most-violated constraint or drop most-negative multiplier, and repeat.

Falls back to .qp_refine if the active-set method does not converge within max_as_iter iterations.

Value

A list with components:

result

List of refined coefficient column vectors by partition.

qp_info

List with active constraint information, or NULL.

converged

Logical; TRUE if active-set method converged.


lgspline documentation built on May 8, 2026, 5:07 p.m.