Skip to content

Commit

Permalink
fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeits committed Jul 24, 2018
1 parent d9e1481 commit b05e110
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/MathProgBase/large_coefficients.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ using Gurobi, MathProgBase, Base.Test
# Min 1.1e100x
# x >= 1
m = MathProgBase.LinearQuadraticModel(GurobiSolver())
MathProgBase.loadproblem!(m, Array(Float64, (0, 1)), [1],[Inf], [1.1e100], Float64[], Float64[], :Min)
MathProgBase.loadproblem!(m, Array{Float64}(0, 1), [1],[Inf], [1.1e100], Float64[], Float64[], :Min)
MathProgBase.optimize!(m)
@test MathProgBase.getsolution(m) == [1.0]
@test MathProgBase.getobjval(m) == 1e100

# Max -1.1e100x
# x >= 1
m = MathProgBase.LinearQuadraticModel(GurobiSolver())
MathProgBase.loadproblem!(m, Array(Float64, (0, 1)), [1],[Inf], [-1.1e100], Float64[], Float64[], :Max)
MathProgBase.loadproblem!(m, Array{Float64}(0, 1), [1],[Inf], [-1.1e100], Float64[], Float64[], :Max)
MathProgBase.optimize!(m)
@test MathProgBase.getsolution(m) == [1.0]
@test MathProgBase.getobjval(m) == -1e100
Expand All @@ -24,28 +24,28 @@ using Gurobi, MathProgBase, Base.Test
# Min x
# x >= 1.1e30
m = MathProgBase.LinearQuadraticModel(GurobiSolver())
MathProgBase.loadproblem!(m, Array(Float64, (0, 1)), [1.1e30],[Inf], [1], Float64[], Float64[], :Min)
MathProgBase.loadproblem!(m, Array{Float64}(0, 1), [1.1e30],[Inf], [1], Float64[], Float64[], :Min)
MathProgBase.optimize!(m)
@test MathProgBase.status(m) == :Infeasible

# Max x
# x <= -1.1e30
m = MathProgBase.LinearQuadraticModel(GurobiSolver())
MathProgBase.loadproblem!(m, Array(Float64, (0, 1)), [-Inf],[-1.1e30], [1], Float64[], Float64[], :Max)
MathProgBase.loadproblem!(m, Array{Float64}(0, 1), [-Inf],[-1.1e30], [1], Float64[], Float64[], :Max)
MathProgBase.optimize!(m)
@test MathProgBase.status(m) == :Infeasible

# Min x
# x >= -1.1e30
m = MathProgBase.LinearQuadraticModel(GurobiSolver())
MathProgBase.loadproblem!(m, Array(Float64, (0, 1)), [-1.1e30],[Inf], [1], Float64[], Float64[], :Min)
MathProgBase.loadproblem!(m, Array{Float64}(0, 1), [-1.1e30],[Inf], [1], Float64[], Float64[], :Min)
MathProgBase.optimize!(m)
@test MathProgBase.status(m) == :Unbounded

# Max x
# x <= 1.1e30
m = MathProgBase.LinearQuadraticModel(GurobiSolver())
MathProgBase.loadproblem!(m, Array(Float64, (0, 1)), [-Inf],[1.1e30], [1], Float64[], Float64[], :Max)
MathProgBase.loadproblem!(m, Array{Float64}(0, 1), [-Inf],[1.1e30], [1], Float64[], Float64[], :Max)
MathProgBase.optimize!(m)
@test MathProgBase.status(m) == :Unbounded

Expand Down

0 comments on commit b05e110

Please sign in to comment.