Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan O'Donoghue committed Jul 2, 2024
1 parent d2eb50a commit 6f41396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/glbopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C" {
#define LOG_CSV_FILENAME (0)
#define TIME_LIMIT_SECS (0.)
/* Tolerance to check negativity condition for infeasibility */
#define EPS_INFEAS_TOL (1e-9)
#define INFEAS_NEGATIVITY_TOL (1e-9)
/* redefine printfs as needed */
#if NO_PRINTING > 0 /* Disable all printing */
#define scs_printf(...) /* No-op */
Expand Down
4 changes: 2 additions & 2 deletions src/scs.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ static void compute_residuals(ScsResiduals *r, scs_int m, scs_int n) {
r->res_unbdd_a = NAN;
r->res_unbdd_p = NAN;
r->res_infeas = NAN;
if (r->ctx_tau < -EPS_INFEAS_TOL) {
if (r->ctx_tau < -INFEAS_NEGATIVITY_TOL) {
nm_ax_s = NORM(r->ax_s, m);
nm_px = NORM(r->px, n);
r->res_unbdd_a = SAFEDIV_POS(nm_ax_s, -r->ctx_tau);
r->res_unbdd_p = SAFEDIV_POS(nm_px, -r->ctx_tau);
}
if (r->bty_tau < -EPS_INFEAS_TOL) {
if (r->bty_tau < -INFEAS_NEGATIVITY_TOL) {
nm_aty = NORM(r->aty, n);
r->res_infeas = SAFEDIV_POS(nm_aty, -r->bty_tau);
}
Expand Down

0 comments on commit 6f41396

Please sign in to comment.