You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eeef310
Browse filesBrowse the repository at this point in the historyBrowse files
Status at the limit: SCS_INDETERMINATE when the iterate gives no estimate (#565)
When SCS stops at max_iters or time_limit_secs at an iterate with tau = 0
(project_cones clips it at zero) and b'y >= 0, c'x >= 0, the iterate is an
estimate of neither a solution, which needs tau > 0, nor a certificate,
which needs b'y < 0 or c'x < 0. set_unfinished returned SCS_FAILED there,
printed "ERROR: could not determine problem status.", left the raw
iterate in x, y, s, never wrote pobj, dobj, gap, res_pri and res_dual, and
appended " (inaccurate - reached max_iters)" to whatever info->status held
(past the end of the field when the caller had not zeroed ScsInfo, as
scs-matlab does not).
It now returns SCS_INDETERMINATE (-3, no longer deprecated), status
"indeterminate (inaccurate - reached max_iters)" (or time_limit_secs),
with x, y, s and the objective and residual fields NaN. An iterate that is
not finite (NaN or Inf in x, y, s, tau or kappa) is tested first and
returns SCS_FAILED, status "failure" with no suffix, the same NaN fields;
before, such an iterate could come back as "solved (inaccurate)" (tau is
fixed at 1 in iteration 0) or as an inaccurate certificate. Every branch
now writes the status before the suffix is appended.
All tests are exact, so the status is a function of the last iterate
alone; the iterates and the other branches are unchanged. No new setting,
field or exit code; the existing all_finite is reused.
Tests (box LP min 2x, -2 <= x <= 2): test_indeterminate_at_limit
(max_iters 2 with a 0x7f-filled ScsInfo; max_iters 3, the default, and a
warm-started re-solve as the other side) and test_nonfinite_at_limit (a
warm start at half the largest scs_float, max_iters 1 and 2). Docs:
exit flags (the -3 and -4 rows, a section on the status at the limit),
settings, info, warm start, termination and help.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/src/api/settings.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ They are set in the :ref:`ScsSettings <ScsSettings>` struct.
42
42
- 1e-6 (1e-2 in single precision builds)
43
43
* - :code:`max_iters`
44
44
- :code:`scs_int`
45
-
- Maximum number of iterations to run.
45
+
- Maximum number of iterations to run. When it is reached SCS returns its best guess with an inaccurate status, or :code:`SCS_INDETERMINATE` when the last iterate gives none, see :ref:`exit flags <exit_flags_limit>`.
46
46
- :math:`\mathbf{N}`
47
47
- 1e5
48
48
* - :code:`eps_abs`
@@ -67,7 +67,7 @@ They are set in the :ref:`ScsSettings <ScsSettings>` struct.
67
67
- 1.5
68
68
* - :code:`time_limit_secs`
69
69
- :code:`scs_float`
70
-
- Time limit for the solve in seconds (can be fractional). :code:`0` is interpreted as no limit. The clock starts when :code:`scs_solve` is called, so the setup time (e.g., the initial factorization) is not counted, although the time column of the printed output does include it. The limit is only tested when convergence is checked, every 25 iterations (:code:`CONVERGED_INTERVAL` in :code:`include/glbopts.h`), so a solve can overrun it by up to 25 iterations. When the limit is reached SCS returns its best guess with an inaccurate status, see :ref:`exit flags <exit_flags>`. It has no effect if SCS is compiled with the :code:`NO_TIMER` :ref:`compile flag <compile_flags>`. It can be changed after setup, for example to give the solve what is left of a total time budget, see :ref:`update_settings`.
70
+
- Time limit for the solve in seconds (can be fractional). :code:`0` is interpreted as no limit. The clock starts when :code:`scs_solve` is called, so the setup time (e.g., the initial factorization) is not counted, although the time column of the printed output does include it. The limit is only tested when convergence is checked, every 25 iterations (:code:`CONVERGED_INTERVAL` in :code:`include/glbopts.h`), so a solve can overrun it by up to 25 iterations. When the limit is reached SCS returns its best guess with an inaccurate status, or :code:`SCS_INDETERMINATE` when the last iterate gives none, see :ref:`exit flags <exit_flags_limit>`. It has no effect if SCS is compiled with the :code:`NO_TIMER` :ref:`compile flag <compile_flags>`. It can be changed after setup, for example to give the solve what is left of a total time budget, see :ref:`update_settings`.
71
71
- :math:`[0, \infty)`
72
72
- 0
73
73
* - :code:`verbose`
@@ -224,8 +224,8 @@ How to check it worked
224
224
^^^^^^^^^^^^^^^^^^^^^^
225
225
226
226
A solve stopped by the time limit returns an inaccurate :ref:`exit flag
227
-
<exit_flags>` and its status ends in:code:`(inaccurate - reached
228
-
time_limit_secs)`. With :code:`verbose` on, :code:`scs_update_settings`
227
+
<exit_flags_limit>`, or :code:`SCS_INDETERMINATE`, and its status ends in
228
+
:code:`(inaccurate - reached time_limit_secs)`. With :code:`verbose` on, :code:`scs_update_settings`
229
229
prints the values now in force, starting :code:`settings updated:`.
0 commit comments