Skip to content

Commit ecf2449

Browse files
authored
Merge pull request #412 from cvxgrp/remove-col-rescale-remnants
Remove dead column-rescaling remnants from adaptive_diag_scale
2 parents ab6daf7 + 7a64eec commit ecf2449

5 files changed

Lines changed: 9 additions & 30 deletions

File tree

hs21_tiny_qp

562 Bytes
Binary file not shown.

include/glbopts.h

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -244,29 +244,20 @@ static inline void *scs_calloc(size_t count, size_t size) {
244244
#define MIN_SCALE_VALUE (1e-6)
245245
#define SCALE_NORM NORM /* what norm to use when computing the scale factor */
246246

247-
/* Dynamic diagonal rescaling (stgs->adaptive_diag_scale). Multipliers
248-
* move by at most (profile ratio)^DIAG_SCALE_DAMP per update. Row
249-
* multipliers live in [DIAG_SCALE_MULT_MIN, DIAG_SCALE_MULT_MAX] around
250-
* the scalar scale. Column multipliers only ever heat (rho_x_j <= rho_x;
251-
* rho_x is a boundary optimum -- the x prox carries no cone so anchoring
252-
* healthy columns is pure loss) and are capped at DIAG_SCALE_COL_MULT_MAX:
253-
* the dual residual is directly proportional to rho_x_j, so the profile
254-
* feedback is fully reflexive and destabilizes (multiplier limit cycles,
255-
* perpetual refactor churn) beyond ~2 orders of magnitude of range. The
256-
* resulting rho_x_j is additionally floored at DIAG_RHO_X_FLOOR for
257-
* factorization health. An update fires when the scalar scale updates, or
258-
* when some damped *clamped* step alone exceeds sqrt(10) (a railed scalar
259-
* must not freeze the diagonal; a railed multiplier must not keep
260-
* triggering updates it cannot take). */
247+
/* Dynamic diagonal rescaling (stgs->adaptive_diag_scale). Row multipliers
248+
* move by at most (profile ratio)^DIAG_SCALE_DAMP per update and live in
249+
* [DIAG_SCALE_MULT_MIN, DIAG_SCALE_MULT_MAX] around the scalar scale. An
250+
* update fires when the scalar scale updates, or when some damped
251+
* *clamped* step alone exceeds sqrt(10) (a railed scalar must not freeze
252+
* the diagonal; a railed multiplier must not keep triggering updates it
253+
* cannot take). */
261254
#define DIAG_SCALE_DAMP (0.25)
262255
#define DIAG_SCALE_MULT_MIN (1e-3)
263256
#define DIAG_SCALE_MULT_MAX (1e3)
264-
#define DIAG_SCALE_COL_MULT_MAX (1e2)
265257
/* Floor on the row-profile denominators, as a fraction of the block's
266258
* rms denominator (see row_rel_res). Swept over 1e-4..1e-1: every value
267259
* improves on no floor, 1e-3 is the best on solve count. */
268260
#define DEN_FLOOR_FRAC (1e-3)
269-
#define DIAG_RHO_X_FLOOR (1e-8)
270261

271262
/* --- Conjugate gradient (CG) parameters, only used with indirect solver --- */
272263
#define CG_BEST_TOL (1e-12)

include/scs.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,8 @@ typedef struct {
6767
scs_int adaptive_scale;
6868
/** Dynamic diagonal rescaling from residual profiles: 0 = off,
6969
* 1 = per-row (rescales the R_y diagonal from the row-wise primal
70-
* residual profile; uniform within non-polyhedral cone blocks),
71-
* 2 = additionally per-column (rho_x lowered, never raised, on columns
72-
* whose dual residuals lag the profile; the default). The dynamic
73-
* analog of two-sided Ruiz equilibration with residuals replacing the
74-
* data norms. Requires `adaptive_scale` (silently disabled without
70+
* residual profile; uniform within non-polyhedral cone blocks; the
71+
* default). Requires `adaptive_scale` (silently disabled without
7572
* it). */
7673
scs_int adaptive_diag_scale;
7774
/** Primal constraint scaling factor. */

rob_gauss_cov_est

2.38 KB
Binary file not shown.

src/scs.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,15 +1237,6 @@ static void set_den_floor(ScsWork *w) {
12371237
w->den_floor = DEN_FLOOR_FRAC * SQRTF(s2 / (scs_float)MAX(m, 1));
12381238
}
12391239

1240-
/* Relative dual residual of column j in the normalized space. */
1241-
static scs_float col_rel_res(const ScsWork *w, scs_int j) {
1242-
const ScsResiduals *r = w->r_normalized;
1243-
scs_float den = MAX(ABS(r->px[j]), ABS(r->aty[j]));
1244-
den = MAX(den, ABS(w->d->c[j]) * r->tau);
1245-
den = MAX(den, _DIV_EPS_TOL);
1246-
return MAX(ABS(r->px_aty_ctau[j]), _DIV_EPS_TOL) / den;
1247-
}
1248-
12491240
static scs_int update_scale(ScsWork *w, const ScsCone *k, scs_int iter) {
12501241
scs_int i;
12511242
scs_float factor, new_scale, relative_res_pri, relative_res_dual;

0 commit comments

Comments
 (0)