chiark / gitweb /
added new NLOPT_ROUNDOFF_LIMITED failure code to indicate when optimizer breaks down...
[nlopt.git] / test / testopt.cpp
index 7c5c435167a9da52c72256e080f0033b99979595..0345ea8b178ded3e6f7f81dff54e798c80c31fde 100644 (file)
@@ -169,7 +169,7 @@ static int test_function(int ifunc)
                         maxeval, maxtime);
     printf("finished after %g seconds.\n", nlopt_seconds() - start);
     printf("return code %d from nlopt_minimize\n", ret);
-    if (ret < 0) {
+    if (ret < 0 && ret != NLOPT_ROUNDOFF_LIMITED) {
       fprintf(stderr, "testopt: error in nlopt_minimize\n");
       return 0;
     }