-
Notifications
You must be signed in to change notification settings - Fork 9
/
MPB_wrapper.jl
34 lines (28 loc) · 1.16 KB
/
MPB_wrapper.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const solver = CSDP.CSDPSolver(printlevel=0)
import MathProgBase
const MPB_test_path = joinpath(dirname(pathof(MathProgBase)), "..", "test")
@testset "Linear tests" begin
include(joinpath(MPB_test_path, "linproginterface.jl"))
linprogsolvertest(solver, 1e-6)
end
@testset "Conic tests" begin
include(joinpath(MPB_test_path, "conicinterface.jl"))
# FIXME fails on Windows 32 bits... Maybe I should put linear vars/cons
# in a diagonal matrix in SemidefiniteModels.jl instead of many 1x1 blocks
@static if !Sys.iswindows() || Sys.WORD_SIZE != 32
@testset "Conic linear tests" begin
coniclineartest(solver, duals=true, tol=1e-6)
end
# :Error for SOC1 on Mac OS: https://travis-ci.org/JuliaOpt/CSDP.jl/jobs/601461403#L389-L391
#@testset "Conic SOC tests" begin
# conicSOCtest(CSDP.CSDPSolver(printlevel=0, write_prob="soc.prob"), duals=true, tol=1e-6)
#end
# CSDP returns :Suboptimal for SOCRotated1
# @testset "Conic SOC rotated tests" begin
# conicSOCRotatedtest(solver, duals=true, tol=1e-6)
# end
end
@testset "Conic SDP tests" begin
conicSDPtest(solver, duals=false, tol=1e-6)
end
end