Skip to content

Commit

Permalink
Merge pull request #133 from JuliaOpt/verbose
Browse files Browse the repository at this point in the history
added new argument to solve method to turn off infeasibility warnings
  • Loading branch information
madeleineudell committed Mar 27, 2016
2 parents c6bf066 + 0d65824 commit cf07d0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/solvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ If we wish to increase the maximum number of iterations for ECOS or SCS, we can
solve!(p, ECOSSolver(maxit=10000))
using SCS
solve!(p, SCSSolver(max_iters=10000))

To turn off the problem status warning issued by Convex when a solver is not able to solve a problem to optimality, use the keyword argument `verbose=false` of the solve method, along with any desired solver parameters:
::

solve!(p, SCSSolver(verbose=false), verbose=false)
6 changes: 4 additions & 2 deletions src/solution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ function solve!(problem::Problem,
end

function solve!(problem::Problem;
warmstart=false, check_vexity=true)
warmstart=false,
check_vexity=true,
verbose=true)

if check_vexity
vex = vexity(problem)
Expand All @@ -34,7 +36,7 @@ function solve!(problem::Problem;
# populate the status, the primal (and possibly dual) solution
# and the primal (and possibly dual) variables with values
populate_solution!(m, problem, var_to_ranges, conic_constraints)
if !(problem.status==:Optimal)
if !(problem.status==:Optimal) && verbose
warn("Problem status $(problem.status); solution may be inaccurate.")
end

Expand Down

0 comments on commit cf07d0e

Please sign in to comment.