Make sure that at least one of eps_rel and eps_abs is positive
@@ -889,6 +889,12 @@ c_int validate_settings(const OSQPSettings * settings){
if (settings->eps_rel < 0) {
#ifdef PRINTING
c_eprint("eps_rel must be nonnegative");
+#endif
+ return 1;
+ }
+ if (settings->eps_rel == 0 && settings->eps_abs == 0){
+#ifdef PRINTING
+ c_eprint("at least one of eps_abs and eps_rel must be positive");
#endif
return 1;
}
