Exit flags
QOCO’s exit flags are defined in the include/enums.h file.
Status |
Status Code |
Value |
|---|---|---|
Solver hasn’t been called |
|
0 |
Solved to desired accuracy |
|
1 |
Solved to low accuracy |
|
2 |
Numerical error or infeasible |
|
3 |
Iteration limit reached |
|
4 |
Status descriptions
- QOCO_SOLVED
The problem was solved to the tolerances specified by
abstolandreltol. The solution inresultsis reliable.- QOCO_SOLVED_INACCURATE
The solver could not reach the primary tolerances (
abstol,reltol) but the solution satisfies the looser tolerancesabstol_inaccandreltol_inacc. The returned solution is an approximation and may be usable depending on the application.- QOCO_NUMERICAL_ERROR
The solver encountered a numerical failure (e.g. a singular KKT system) the problem is primal or dual infeasible. Check that the problem data is well-scaled. If the problem is feasible, try increasing
kkt_static_regorkkt_dynamic_regto improve numerical stability.- QOCO_MAX_ITER
The solver reached the iteration limit set by
max_iterswithout converging. Try increasingmax_iters, enabling Ruiz equilibration withruiz_iters, or reformulating the problem to improve conditioning.- QOCO_UNSOLVED
solve()has not been called yet.
Setup error codes
qoco_setup() and qoco_update_settings() return one of the following integer error codes:
Error Code |
Value |
Meaning |
|---|---|---|
|
0 |
Setup completed successfully. |
|
1 |
Invalid problem data (e.g. wrong dimensions, null matrix). |
|
2 |
Invalid settings (e.g. non-positive tolerance). |
|
3 |
Internal setup failure. |
|
4 |
Failure during AMD fill-reducing ordering. |
|
5 |
Memory allocation failure. |