@@ -30,7 +30,7 @@ def create_trsp_solver(spsolver):
3030
3131 .. code:: python
3232
33- Xsp, mdec, flag = solve_trsp(H, G, Low, Upp)
33+ Xsp, mdec, found_solution = solve_trsp(H, G, Low, Upp)
3434
3535 where
3636
@@ -43,9 +43,8 @@ def create_trsp_solver(spsolver):
4343 * ``Xsp`` is the subproblem solution,
4444 * ``mdec`` is the value of the subproblem objective function at
4545 the solution, and
46- * ``flag`` communicates the termination condition of the solver with a
47- negative value indicating failure and all other values indicating
48- success.
46+ * ``found_solution`` is True if a solution was found that should be
47+ acceptable for POUNDERS's purposes; False, otherwise.
4948 """
5049 if spsolver == TRSP_SOLVER_SIMPLE :
5150 # Since this solver is for testing/debugging only, we do not mention it
@@ -56,7 +55,7 @@ def create_trsp_solver(spsolver):
5655 def __bqmin_wrapper (H , G , Low , Upp ):
5756 # Assume that solver error checks its arguments thoroughly.
5857 Xsp , mdec = bqmin (H , G , Low , Upp )
59- return Xsp , mdec , 0
58+ return Xsp , mdec , True
6059
6160 return __bqmin_wrapper
6261
@@ -81,10 +80,11 @@ def __minq5_wrapper(H, G, Low, Upp):
8180 # better approximation to the solution. But, it might be useful for
8281 # developers/power users to be able to identify when the budget
8382 # limit is reached. Once we have improved logging, print debug
84- # messages at high verbosity levels if minq_err == 99? Better to
85- # let POUNDERS log?
83+ # messages at high verbosity levels if minq_err == 99? Since we are
84+ # returing a boolean, all logging would have to be done by this
85+ # wrapper layer.
8686 # assert minq_err != 99
87- return Xsp , mdec , minq_err
87+ return Xsp , mdec , ( minq_err >= 0 )
8888
8989 return __minq5_wrapper
9090
0 commit comments