Skip to content

Commit

Permalink
Fixes from @rofinn's review
Browse files Browse the repository at this point in the history
Move comment for code clarity
  • Loading branch information
ericphanson committed Oct 28, 2019
1 parent 0600668 commit ed6b23b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/problem_depot.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function affine_negate_atom(handle_problem!, ::Val{test}, atol, rtol, ::Type{T})

this should be the same for every problem, except for the name, which is a description of the problem. It should include what kind of atoms it uses (`affine` in this case), so that certain kinds of atoms can be ruled out by the `exclude` keyword to [`run_tests`](@ref) and [`benchmark_suite`](@ref); for example, many solvers cannot solve mixed-integer problems, so `mip` is included in the name of such problems.

Then begins the body of the problem. It is setup like any other Convex.jl problem, only `handle_problem!` is called instead of `solve!`. This allows particular solvers to be used (via e.g. choosing `handle_problem! = p -> solve!(p, solver)`), or for any other function of the problem (e.g. `handle_problem! = p -> Convex.conic_problem(p)` which is used for benchmarking problem formulation speed.) Tests should be included and gated behind `if test` blocks, so that tests can be skipped for benchmarking, or in the case that the problem is not in fact solved during `handle_problem!`.
Then begins the body of the problem. It is setup like any other Convex.jl problem, only `handle_problem!` is called instead of `solve!`. This allows particular solvers to be used (via e.g. choosing `handle_problem! = p -> solve!(p, solver)`), or for any other function of the problem. Tests should be included and gated behind `if test` blocks, so that tests can be skipped for benchmarking, or in the case that the problem is not in fact solved during `handle_problem!`.

The fact that the problems may not be solved during `handle_problem!` brings with it a small complication: any command that assumes the problem has been solved should be behind an `if test` check. For example, in some of the problems, `real(x.value)` is used, for a variable `x`; perhaps as

Expand Down
5 changes: 2 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ end
include("test_utilities.jl")

@testset "SCS" begin
run_tests(; exclude=[ r"mip",
r"sdp_matrix_frac_atom", # bug: https://github.com/JuliaOpt/SCS.jl/issues/153
]) do p
# We exclude `sdp_matrix_frac_atom` due to the bug https://github.com/JuliaOpt/SCS.jl/issues/153
run_tests(; exclude=[r"mip", r"sdp_matrix_frac_atom"]) do p
solve!(p, SCS.Optimizer(verbose=0, eps=1e-6))
end
end
Expand Down

0 comments on commit ed6b23b

Please sign in to comment.